combinat-0.2.4.1: Generation of various combinatorial objects.Source codeContentsIndex
Math.Combinat.Compositions
Description
Compositions. This module is equivalent to the module Combinations, but it turns out that "compositions" is the accepted name. I will remove the Combinations module in the future.
Synopsis
compositions' :: [Int] -> Int -> [[Int]]
countCompositions' :: [Int] -> Int -> Integer
allCompositions' :: [Int] -> [[[Int]]]
compositions :: Integral a => a -> a -> [[Int]]
countCompositions :: Integral a => a -> a -> Integer
compositions1 :: Integral a => a -> a -> [[Int]]
countCompositions1 :: Integral a => a -> a -> Integer
Documentation
compositions'Source
:: [Int]shape
-> Intsum
-> [[Int]]

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

 sort cs == cs where cs = compositions' shape k
countCompositions' :: [Int] -> Int -> IntegerSource
allCompositions' :: [Int] -> [[[Int]]]Source
All compositions fitting into a given shape.
compositionsSource
:: Integral a
=> alength
-> asum
-> [[Int]]
Compositions of a given length.
countCompositions :: Integral a => a -> a -> IntegerSource
# = \binom { len+d-1 } { len-1 }
compositions1Source
:: Integral a
=> alength
-> asum
-> [[Int]]
Positive compositions of a given length.
countCompositions1 :: Integral a => a -> a -> IntegerSource
Produced by Haddock version 2.6.1