sym-0.11: Permutations, patterns, and statistics

MaintainerAnders Claesson <anders.claesson@gmail.com>
Safe HaskellNone

Sym.Perm.Pattern

Description

 

Synopsis

Documentation

type Pattern = PermSource

Pattern is just an alias for permutation.

type SubSeq = CLongArraySource

A SubSeq is represented by an increasing array of non-negative integers.

ordiso :: Pattern -> Perm -> SubSeq -> BoolSource

ordiso u v m determines whether the subword in v specified by m is order isomorphic to u.

choose :: Int -> Int -> [SubSeq]Source

n `choose` k is the list of subsequences of [0..n-1] with k elements.

copiesOf :: Pattern -> Perm -> [SubSeq]Source

copiesOf p w is the list of sets that represent copies of p in w.

contains :: Perm -> Pattern -> BoolSource

w contains p is a predicate determining if w contains the pattern p.

avoids :: Perm -> Pattern -> BoolSource

w avoids p is a predicate determining if w avoids the pattern p.

avoidsAll :: Perm -> [Pattern] -> BoolSource

w avoidsAll ps is a predicate determining if w avoids the patterns ps.

avoiders :: [Pattern] -> [Perm] -> [Perm]Source

avoiders ps ws is the list of permutations in ws avoiding the patterns in ps.

minima :: [Pattern] -> [Pattern]Source

The set of minimal elements with respect to containment. FIX: Poor implementation

maxima :: [Pattern] -> [Pattern]Source

The set of maximal elements with respect to containment. FIX: Poor implementation

coeff :: (Pattern -> Int) -> Pattern -> IntSource

coeff f v is the coefficient of v when expanding the permutation statistic f as a sum of permutations/patterns. See Petter Brändén and Anders Claesson: Mesh patterns and the expansion of permutation statistics as sums of permutation patterns, The Electronic Journal of Combinatorics 18(2) (2011), http://www.combinatorics.org/ojs/index.php/eljc/article/view/v18i2p5.