species-0.3.2.3: Computational combinatorial species

Stabilityexperimental
Maintainerbyorgey@cis.upenn.edu
Safe HaskellNone

Math.Combinatorics.Species.Types

Contents

Description

Some common types used by the species library, along with some utility functions.

Synopsis

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

newtype EGF Source

Exponential generating functions, for counting labeled species.

Constructors

EGF 

Fields

unEGF :: T Rational
 

Instances

newtype GF Source

Ordinary generating functions, for counting unlabeled species.

Constructors

GF (T Integer) 

Instances

liftGF2 :: (T Integer -> T Integer -> T Integer) -> GF -> GF -> GFSource

newtype CycleIndex Source

Cycle index series.

Constructors

CI (T Rational) 

Instances

Show CycleIndex 
C CycleIndex 
C CycleIndex 
C CycleIndex 
Species CycleIndex

An interpretation of species expressions as cycle index series. For the definition of the CycleIndex type, see Math.Combinatorics.Species.Types.

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.