combinat-0.2.4.1: Generation of various combinatorial objects.

Math.Combinat.Combinations

Description

Combinations. This module is depracated; it is equivalent to the module Compositions, but it turns out that "compositions" is the accepted name. I will remove this module in the future.

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.