Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data KnuthForest a
- = Fork {
- kNode :: a
- kChildren :: KnuthForest a
- kSiblings :: KnuthForest a
- | Nil
- = Fork {
- size :: KnuthForest a -> Int
- elem :: Eq a => a -> KnuthForest a -> Bool
- elemPath :: Eq a => [a] -> KnuthForest a -> Bool
- isSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isProperSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isProperSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isSiblingOf :: Eq a => a -> KnuthForest a -> Bool
- isChildOf :: Eq a => a -> KnuthForest a -> Bool
- isDescendantOf :: Eq a => a -> KnuthForest a -> Bool
- isProperDescendantOf :: Eq a => a -> KnuthForest a -> Bool
- singleton :: a -> KnuthForest a
- delete :: Eq a => a -> KnuthForest a -> KnuthForest a
- union :: KnuthForest a -> KnuthForest a -> KnuthForest a
- intersection :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a
- difference :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a
- toForest :: KnuthForest a -> Forest a
- fromForest :: Forest a -> KnuthForest a
Forest
data KnuthForest a Source #
Fork | |
| |
Nil |
Instances
Query
size :: KnuthForest a -> Int Source #
isSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool Source #
isSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool Source #
isProperSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool Source #
No siblings
isProperSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool Source #
Depth-first
isSiblingOf :: Eq a => a -> KnuthForest a -> Bool Source #
isDescendantOf :: Eq a => a -> KnuthForest a -> Bool Source #
isProperDescendantOf :: Eq a => a -> KnuthForest a -> Bool Source #
Construction
singleton :: a -> KnuthForest a Source #
delete :: Eq a => a -> KnuthForest a -> KnuthForest a Source #
Combination
union :: KnuthForest a -> KnuthForest a -> KnuthForest a Source #
intersection :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a Source #
difference :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a Source #
Removes the possible subtree on the right, from the left.
toForest :: KnuthForest a -> Forest a Source #
fromForest :: Forest a -> KnuthForest a Source #