Stability | experimental |
---|---|

Maintainer | byorgey@cis.upenn.edu |

Safe Haskell | None |

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) ``

, then the permutation has `elem`

` c`n`

cycles of size `k`

.

# Series types

Exponential generating functions, for counting labeled species.

egfFromCoeffs :: [Rational] -> EGFSource

Ordinary generating functions, for counting unlabeled species.

gfFromCoeffs :: [Integer] -> GFSource

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] -> CycleIndexSource

liftCI :: (T Rational -> T Rational) -> CycleIndex -> CycleIndexSource

liftCI2 :: (T Rational -> T Rational -> T Rational) -> CycleIndex -> CycleIndex -> CycleIndexSource

# 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.