Copyright | (c) Brent Yorgey 2010 |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | byorgey@cis.upenn.edu |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Some common types used by the species library, along with some utility functions.
- type CycleType = [(Integer, Integer)]
- newtype EGF = EGF {}
- egfFromCoeffs :: [Rational] -> EGF
- liftEGF :: (T Rational -> T Rational) -> EGF -> EGF
- liftEGF2 :: (T Rational -> T Rational -> T Rational) -> EGF -> EGF -> EGF
- newtype GF = GF (T Integer)
- gfFromCoeffs :: [Integer] -> GF
- liftGF :: (T Integer -> T Integer) -> GF -> GF
- liftGF2 :: (T Integer -> T Integer -> T Integer) -> GF -> GF -> GF
- newtype CycleIndex = CI (T Rational)
- ciFromMonomials :: [T Rational] -> CycleIndex
- liftCI :: (T Rational -> T Rational) -> CycleIndex -> CycleIndex
- liftCI2 :: (T Rational -> T Rational -> T Rational) -> CycleIndex -> CycleIndex -> CycleIndex
- filterCoeffs :: C a => (Integer -> Bool) -> [a] -> [a]
- selectIndex :: (C a, Eq a) => Integer -> [a] -> [a]
Miscellaneous
type CycleType = [(Integer, Integer)] Source
A representation of the cycle type of a permutation. If c ::
CycleType
and (k,n) ``elem`` c
, then the permutation has n
cycles of size k
.
Series types
Exponential generating functions, for counting labeled species.
egfFromCoeffs :: [Rational] -> EGF Source
Ordinary generating functions, for counting unlabeled species.
gfFromCoeffs :: [Integer] -> GF Source
newtype CycleIndex Source
Cycle index series.
Show CycleIndex | |
C CycleIndex | |
C CycleIndex | |
C CycleIndex | |
Species CycleIndex | An interpretation of species expressions as cycle index series.
For the definition of the |
ciFromMonomials :: [T Rational] -> CycleIndex Source
liftCI :: (T Rational -> T Rational) -> CycleIndex -> CycleIndex Source
liftCI2 :: (T Rational -> T Rational -> T Rational) -> CycleIndex -> CycleIndex -> CycleIndex Source
Series utility functions
filterCoeffs :: C a => (Integer -> Bool) -> [a] -> [a] Source
Filter the coefficients of a series according to a predicate.
selectIndex :: (C a, Eq a) => Integer -> [a] -> [a] Source
Set every coefficient of a series to 0 except the selected index. Truncate any trailing zeroes.