Copyright | (c) Eddie Jones 2020 |
---|---|
License | BSD-3 |
Maintainer | eddiejones2108@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Zero-suppressed Binary Decision Diagrams
Synopsis
- data Diagram l s a
- runDiagram :: (forall s. Diagram l s a) -> a
- data Family l s
- mkFamily :: (Eq l, Hashable l) => l -> Family l s -> Family l s -> Diagram l s (Family l s)
- empty :: Family l s
- base :: Family l s
- change :: (Ord l, Hashable l) => l -> Family l s -> Diagram l s (Family l s)
- subset :: (Ord l, Hashable l) => l -> Bool -> Family l s -> Diagram l s (Family l s)
- bindElem :: (Ord l, Hashable l) => Family l s -> (l -> Diagram l s (Family l s)) -> Diagram l s (Family l s)
- intersect :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s)
- union :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s)
- difference :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s)
- fold :: (Hashable l, Eq l) => (l -> b -> b -> Diagram l s b) -> (Bool -> Diagram l s b) -> Family l s -> Diagram l s b
- anySat :: (Hashable l, Eq l) => Family l s -> Diagram l s Bool
Diagram
A binary decision diagram
runDiagram :: (forall s. Diagram l s a) -> a Source #
Extract non-diagrammatic information
Families of Sets
A diagramatic family of sets build on atomic elements of type l
Instances
Eq (Family l s) Source # | |
Ord (Family l s) Source # | |
mkFamily :: (Eq l, Hashable l) => l -> Family l s -> Family l s -> Diagram l s (Family l s) Source #
Make a family (if not already present) from it's hi and lo cases
change :: (Ord l, Hashable l) => l -> Family l s -> Diagram l s (Family l s) Source #
Flip an element in a family
subset :: (Ord l, Hashable l) => l -> Bool -> Family l s -> Diagram l s (Family l s) Source #
Subsets that do or do not contain a particular element
bindElem :: (Ord l, Hashable l) => Family l s -> (l -> Diagram l s (Family l s)) -> Diagram l s (Family l s) Source #
Replace an element with a family of sets
Combinations
intersect :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s) Source #
The intersection of families
union :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s) Source #
The union of families
difference :: (Ord l, Hashable l) => Family l s -> Family l s -> Diagram l s (Family l s) Source #
The difference between families