combinat-0.2.9.0: Generate and manipulate various combinatorial objects.

Safe HaskellNone
LanguageHaskell2010

Math.Combinat.Tuples

Description

Tuples.

Synopsis

Documentation

tuples' :: [Int] -> [[Int]] Source #

"Tuples" fitting into a give shape. The order is lexicographic, that is,

sort ts == ts where ts = tuples' shape

Example:

tuples' [2,3] = 
  [[0,0],[0,1],[0,2],[0,3],[1,0],[1,1],[1,2],[1,3],[2,0],[2,1],[2,2],[2,3]]

tuples1' :: [Int] -> [[Int]] Source #

positive "tuples" fitting into a give shape.

countTuples' :: [Int] -> Integer Source #

# = \prod_i (m_i + 1)

countTuples1' :: [Int] -> Integer Source #

# = \prod_i m_i

tuples Source #

Arguments

:: Int

length (width)

-> Int

maximum (height)

-> [[Int]] 

tuples1 Source #

Arguments

:: Int

length (width)

-> Int

maximum (height)

-> [[Int]] 

countTuples :: Int -> Int -> Integer Source #

# = (m+1) ^ len

countTuples1 :: Int -> Int -> Integer Source #

# = m ^ len