Safe Haskell | None |
---|---|
Language | Haskell2010 |
Some auxilary functions
Synopsis
- data Pair a = Pair a a
- sum' :: Num a => [a] -> a
- unique :: Ord a => [a] -> [a]
- count :: Ord b => [b] -> Map b Integer
- histogram :: Ord b => [b] -> Map b Integer
- longZipWith :: (a -> c) -> (b -> c) -> (a -> b -> c) -> [a] -> [b] -> [c]
- evens :: [a] -> [a]
- odds :: [a] -> [a]
- interleave :: [a] -> [a] -> [a]
- deleteLookup :: Ord a => a -> Map a b -> (Maybe b, Map a b)
- unsafeDeleteLookup :: Ord a => a -> Map a b -> (b, Map a b)
- insertMap :: Ord k => (b -> a) -> (b -> a -> a) -> k -> b -> Map k a -> Map k a
- buildMap :: Ord k => (b -> a) -> (b -> a -> a) -> [(k, b)] -> Map k a
- aut :: Partition -> Integer
- exponentVector :: Partition -> [Int]
- defaultSetPartition :: Partition -> SetPartition
- linearIndices :: Partition -> [[Int]]
- fromRat :: Rational -> Integer
- safeDiv :: Integer -> Integer -> Integer
- chooseN1 :: [a] -> [[a]]
- symPolyNum :: Num a => Int -> [a] -> a
- paren :: String -> String
- expFormString :: Partition -> String
- extendStringL :: Int -> String -> String
- extendStringR :: Int -> String -> String
- class Mathematica a where
- mathematica :: a -> String
- data Indexed a = Indexed String a
Pairs
Pair a a |
Lists
longZipWith :: (a -> c) -> (b -> c) -> (a -> b -> c) -> [a] -> [b] -> [c] Source #
interleave :: [a] -> [a] -> [a] Source #
Maps
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
symPolyNum :: Num a => Int -> [a] -> a Source #
Utility
expFormString :: Partition -> String Source #
Exponential form of a partition
Mathematica-formatted output
class Mathematica a where Source #
mathematica :: a -> String Source #
Instances
Mathematica Int Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: Int -> String Source # | |
Mathematica Integer Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: Integer -> String Source # | |
Mathematica String Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: String -> String Source # | |
Mathematica Partition Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: Partition -> String Source # | |
Mathematica a => Mathematica (Indexed a) Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: Indexed a -> String Source # |
Instances
Mathematica a => Mathematica (Indexed a) Source # | |
Defined in Math.RootLoci.Misc.Common mathematica :: Indexed a -> String Source # |