combinat- Generation of various combinatorial objects.Source codeContentsIndex
unique labels
labelling by depth
labelling by number of children
N-ary trees.
derivTrees :: [Int] -> [Tree ()]
addUniqueLabelsTree :: Tree a -> Tree (a, Int)
addUniqueLabelsForest :: Forest a -> Forest (a, Int)
addUniqueLabelsTree_ :: Tree a -> Tree Int
addUniqueLabelsForest_ :: Forest a -> Forest Int
labelDepthTree :: Tree a -> Tree (a, Int)
labelDepthForest :: Forest a -> Forest (a, Int)
labelDepthTree_ :: Tree a -> Tree Int
labelDepthForest_ :: Forest a -> Forest Int
labelNChildrenTree :: Tree a -> Tree (a, Int)
labelNChildrenForest :: Forest a -> Forest (a, Int)
labelNChildrenTree_ :: Tree a -> Tree Int
labelNChildrenForest_ :: Forest a -> Forest Int
derivTrees :: [Int] -> [Tree ()]Source

Computes the set of equivalence classes of rooted trees (in the sense that the leaves of a node are unordered) with n = length ks leaves where the set of heights of the leaves matches the given set of numbers. The height is defined as the number of edges from the leaf to the root.

TODO: better name?

unique labels
addUniqueLabelsTree :: Tree a -> Tree (a, Int)Source
Adds unique labels to a Tree.
addUniqueLabelsForest :: Forest a -> Forest (a, Int)Source
Adds unique labels to a Forest
addUniqueLabelsTree_ :: Tree a -> Tree IntSource
addUniqueLabelsForest_ :: Forest a -> Forest IntSource
labelling by depth
labelDepthTree :: Tree a -> Tree (a, Int)Source
Attaches the depth to each node. The depth of the root is 0.
labelDepthForest :: Forest a -> Forest (a, Int)Source
labelDepthTree_ :: Tree a -> Tree IntSource
labelDepthForest_ :: Forest a -> Forest IntSource
labelling by number of children
labelNChildrenTree :: Tree a -> Tree (a, Int)Source
Attaches the number of children to each node.
labelNChildrenForest :: Forest a -> Forest (a, Int)Source
labelNChildrenTree_ :: Tree a -> Tree IntSource
labelNChildrenForest_ :: Forest a -> Forest IntSource
Produced by Haddock version 2.6.1