Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

## Synopsis

- class C set where
- empty :: set a
- union, intersection :: Ord a => set a -> set a -> set a
- unit :: set a
- leftNonEmptyProduct :: T a -> set a -> set a
- flatten :: Ord a => set a -> [[a]]
- symbols :: Ord a => set a -> Set a
- null :: set a -> Bool
- size :: set a -> Integer
- select :: set a -> Integer -> [a]
- representationSize :: set a -> Int
- compress :: Ord a => set a -> set a

- cube :: C set => T a -> Int -> set a
- unions :: (C set, Ord a) => [set a] -> set a
- intersections :: (C set, Ord a) => T [] (set a) -> set a
- intersectionsPQ :: (C set, Ord a) => T [] (set a) -> set a
- (*&) :: (C set, Ord a) => Set a -> set a -> set a
- (#*&) :: C set => a -> set a -> set a

# Documentation

union :: Ord a => set a -> set a -> set a Source #

intersection :: Ord a => set a -> set a -> set a Source #

leftNonEmptyProduct :: T a -> set a -> set a Source #

flatten :: Ord a => set a -> [[a]] Source #

symbols :: Ord a => set a -> Set a Source #

null :: set a -> Bool Source #

size :: set a -> Integer Source #

select :: set a -> Integer -> [a] Source #

representationSize :: set a -> Int Source #

compress :: Ord a => set a -> set a Source #

simplify set representation by combining set products where possible

## Instances

C T Source # | |

Defined in Game.Mastermind.CodeSet.Union union :: Ord a => T a -> T a -> T a Source # intersection :: Ord a => T a -> T a -> T a Source # leftNonEmptyProduct :: T0 a -> T a -> T a Source # flatten :: Ord a => T a -> [[a]] Source # symbols :: Ord a => T a -> Set a Source # size :: T a -> Integer Source # select :: T a -> Integer -> [a] Source # representationSize :: T a -> Int Source # | |

C T Source # | |

Defined in Game.Mastermind.CodeSet.Tree union :: Ord a => T a -> T a -> T a Source # intersection :: Ord a => T a -> T a -> T a Source # leftNonEmptyProduct :: T0 a -> T a -> T a Source # flatten :: Ord a => T a -> [[a]] Source # symbols :: Ord a => T a -> Set a Source # size :: T a -> Integer Source # select :: T a -> Integer -> [a] Source # representationSize :: T a -> Int Source # |