species-0.3.2: Computational combinatorial species




An interpretation of species as exponential generating functions, which count labeled structures.



labeled :: EGF -> [Integer]Source

Extract the coefficients of an exponential generating function as a list of Integers. Since EGF is an instance of Species, the idea is that labeled can be applied directly to an expression of the species DSL. In particular, labeled s !! n is the number of labeled s-structures on an underlying set of size n (note that labeled s is guaranteed to be an infinite list). For example:

 > take 10 $ labeled octopi

gives the number of labeled octopi on 0, 1, 2, 3, ... 9 labels.

labelled :: EGF -> [Integer]Source

A synonym for labeled, since both spellings are acceptable and it's annoying to have to remember which is correct.