combinatorial-0.1.1: Count, enumerate, rank and unrank combinatorial objects
Safe HaskellSafe-Inferred
LanguageHaskell98

Combinatorics.Partitions

Synopsis

Documentation

pentagonalPowerSeries :: [Integer] Source #

This is a very efficient implementation of prodLinearFactors.

partitionsInc :: Integral a => a -> a -> [[a]] Source #

Give all partitions of the natural number n with summands which are at least k. Not quite correct for k>n.

partitionsDec :: Integral a => a -> a -> [[a]] Source #

allPartitionsInc :: [[[[Int]]]] Source #

type Int is needed because of list node indexing

QC.forAll (QC.choose (1,10)) $ \k -> QC.forAll (QC.choose (0,50)) $ \n -> Parts.partitionsInc k n == Parts.allPartitionsInc !! k !! n
equating (take 30) (map genericLength (Parts.allPartitionsInc !! 1)) Parts.numPartitions

propInfProdLinearFactors :: Int -> Bool Source #

QC.forAll (QC.choose (0,100)) Parts.propInfProdLinearFactors

propPentagonalPowerSeries :: Int -> Bool Source #

Parts.propPentagonalPowerSeries 1000

propPentagonalsDifP :: Int -> Bool Source #

Parts.propPentagonalsDifP 10000

propPentagonalsDifN :: Int -> Bool Source #

Parts.propPentagonalsDifN 10000