combinat-0.2.2: Generation of various combinatorial objects.

Math.Combinat.Combinations

Description

Combinations

Synopsis

Documentation

combinations'Source

Arguments

:: [Int]

shape

-> Int

sum

-> [[Int]] 

Combinations fitting into a given shape and having a given degree. The order is lexicographic, that is,

 sort cs == cs where cs = combinations' shape k

allCombinations' :: [Int] -> [[[Int]]]Source

All combinations fitting into a given shape.

combinationsSource

Arguments

:: Int

length

-> Int

sum

-> [[Int]] 

Combinations of a given length.

countCombinations :: Int -> Int -> IntegerSource

# = \binom { len+d-1 } { len-1 }

combinations1Source

Arguments

:: Int

length

-> Int

sum

-> [[Int]] 

Positive combinations of a given length.