Safe Haskell | None |
---|---|
Language | Haskell2010 |
AOC.Common.Subset
Synopsis
- findSubset :: (Monad m, Ord a) => (Set a -> m Ordering) -> Bool -> Set a -> m (Maybe (Set a))
- testFinder :: Bool -> Int -> Map (Set Int) Int
- allBranches :: Ord a => Bool -> Set a -> [(Set a, [(Set a, Ordering)])]
- buildDTree :: Ord a => Bool -> Set a -> Maybe (DTree a)
- renderBranches :: (Ord a, Show a) => Bool -> Set a -> Maybe Text
- renderBranchesChar :: Bool -> Set Char -> Maybe Text
- data DTree a = DNode {}
- dTestF :: DTreeF a r -> Set a
- dLTF :: DTreeF a r -> Maybe r
- dGTF :: DTreeF a r -> Maybe r
Documentation
Get the number of guesses needed for each possible subset, for n items.
Instances
Show a => Show (DTree a) Source # | |
Recursive (DTree a) Source # | |
Defined in AOC.Common.Subset Methods project :: DTree a -> Base (DTree a) (DTree a) # cata :: (Base (DTree a) a0 -> a0) -> DTree a -> a0 # para :: (Base (DTree a) (DTree a, a0) -> a0) -> DTree a -> a0 # gpara :: (Corecursive (DTree a), Comonad w) => (forall b. Base (DTree a) (w b) -> w (Base (DTree a) b)) -> (Base (DTree a) (EnvT (DTree a) w a0) -> a0) -> DTree a -> a0 # prepro :: Corecursive (DTree a) => (forall b. Base (DTree a) b -> Base (DTree a) b) -> (Base (DTree a) a0 -> a0) -> DTree a -> a0 # gprepro :: (Corecursive (DTree a), Comonad w) => (forall b. Base (DTree a) (w b) -> w (Base (DTree a) b)) -> (forall c. Base (DTree a) c -> Base (DTree a) c) -> (Base (DTree a) (w a0) -> a0) -> DTree a -> a0 # | |
Corecursive (DTree a) Source # | |
Defined in AOC.Common.Subset Methods embed :: Base (DTree a) (DTree a) -> DTree a # ana :: (a0 -> Base (DTree a) a0) -> a0 -> DTree a # apo :: (a0 -> Base (DTree a) (Either (DTree a) a0)) -> a0 -> DTree a # postpro :: Recursive (DTree a) => (forall b. Base (DTree a) b -> Base (DTree a) b) -> (a0 -> Base (DTree a) a0) -> a0 -> DTree a # gpostpro :: (Recursive (DTree a), Monad m) => (forall b. m (Base (DTree a) b) -> Base (DTree a) (m b)) -> (forall c. Base (DTree a) c -> Base (DTree a) c) -> (a0 -> Base (DTree a) (m a0)) -> a0 -> DTree a # | |
type Base (DTree a) Source # | |
Defined in AOC.Common.Subset |