coincident-root-loci-0.3: Equivariant CSM classes of coincident root loci
Safe HaskellNone
LanguageHaskell2010

Math.RootLoci.Misc.Common

Description

Some auxilary functions

Synopsis

Pairs

data Pair a Source #

Constructors

Pair a a 

Instances

Instances details
Functor Pair Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Methods

fmap :: (a -> b) -> Pair a -> Pair b #

(<$) :: a -> Pair b -> Pair a #

Eq a => Eq (Pair a) Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Methods

(==) :: Pair a -> Pair a -> Bool #

(/=) :: Pair a -> Pair a -> Bool #

Ord a => Ord (Pair a) Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Methods

compare :: Pair a -> Pair a -> Ordering #

(<) :: Pair a -> Pair a -> Bool #

(<=) :: Pair a -> Pair a -> Bool #

(>) :: Pair a -> Pair a -> Bool #

(>=) :: Pair a -> Pair a -> Bool #

max :: Pair a -> Pair a -> Pair a #

min :: Pair a -> Pair a -> Pair a #

Show a => Show (Pair a) Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Methods

showsPrec :: Int -> Pair a -> ShowS #

show :: Pair a -> String #

showList :: [Pair a] -> ShowS #

Lists

sum' :: Num a => [a] -> a Source #

unique :: Ord a => [a] -> [a] Source #

count :: Ord b => [b] -> Map b Integer Source #

Synonym for histogram

histogram :: Ord b => [b] -> Map b Integer Source #

longZipWith :: (a -> c) -> (b -> c) -> (a -> b -> c) -> [a] -> [b] -> [c] Source #

evens :: [a] -> [a] Source #

odds :: [a] -> [a] Source #

interleave :: [a] -> [a] -> [a] Source #

Maps

deleteLookup :: Ord a => a -> Map a b -> (Maybe b, Map a b) Source #

unsafeDeleteLookup :: Ord a => a -> Map a b -> (b, Map a b) Source #

insertMap :: Ord k => (b -> a) -> (b -> a -> a) -> k -> b -> Map k a -> Map k a Source #

Example usage: insertMap (:[]) (:) ...

buildMap :: Ord k => (b -> a) -> (b -> a -> a) -> [(k, b)] -> Map k a Source #

Example usage: buildMap (:[]) (:) ...

Partitions

aut :: Partition -> Integer Source #

aut(mu) is the number of symmetries of the partition mu:

aut(mu) = prod_r (e_r)!

where mu = (1^e1 2^e2 .. k^ek)

exponentVector :: Partition -> [Int] Source #

TODO: move this into combinat

Set partitions

defaultSetPartition :: Partition -> SetPartition Source #

Makes set partition from a partition (simply filling up from left to right) with the shape giving back the input partition

linearIndices :: Partition -> [[Int]] Source #

Produce linear indices from a partition nu (to encode the diagonal map Delta_nu).

Signs

Numbers

Combinatorics

chooseN1 :: [a] -> [[a]] Source #

Chooses (n-1) elements out of n

symPolyNum :: Num a => Int -> [a] -> a Source #

Utility

paren :: String -> String Source #

Put into parentheses

expFormString :: Partition -> String Source #

Exponential form of a partition

Mathematica-formatted output

class Mathematica a where Source #

Methods

mathematica :: a -> String Source #

Instances

Instances details
Mathematica Int Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Mathematica Integer Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Mathematica String Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Mathematica Partition Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

Mathematica a => Mathematica (Indexed a) Source # 
Instance details

Defined in Math.RootLoci.Misc.Common

data Indexed a Source #

Constructors

Indexed String a 

Instances

Instances details
Mathematica a => Mathematica (Indexed a) Source # 
Instance details

Defined in Math.RootLoci.Misc.Common