combinat-0.2.7.0: Generation of various combinatorial objects.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Combinat.Partitions.Vector

Description

Vector partitions. See:

  • Donald E. Knuth: The Art of Computer Programming, vol 4, pre-fascicle 3B.

Synopsis

Documentation

type IntVector = UArray Int Int Source

Integer vectors. The indexing starts from 1.

vectorPartitions :: IntVector -> [[IntVector]] Source

Vector partitions. Basically a synonym for fasc3B_algorithm_M.

fasc3B_algorithm_M :: [Int] -> [[IntVector]] Source

Generates all vector partitions ("algorithm M" in Knuth). The order is decreasing lexicographic.