monadiccp-0.7.7: Constraint Programming

Safe HaskellNone
LanguageHaskell98

Control.CP.EnumTerm

Documentation

class (Solver s, Term s t, Show (TermBaseType s t)) => EnumTerm s t where Source #

Minimal complete definition

getDomain, setValue

Associated Types

type TermBaseType s t :: * Source #

Methods

getDomainSize :: t -> s Int Source #

getDomain :: t -> s [TermBaseType s t] Source #

setValue :: t -> TermBaseType s t -> s [Constraint s] Source #

splitDomain :: t -> s ([[Constraint s]], Bool) Source #

splitDomains :: [t] -> s ([[Constraint s]], [t]) Source #

getValue :: t -> s (Maybe (TermBaseType s t)) Source #

defaultOrder :: [t] -> s [t] Source #

enumerator :: (MonadTree m, TreeSolver m ~ s) => Maybe ([t] -> m ()) Source #

Instances

EnumTerm OvertonFD FDVar Source # 
(FDSolver s, EnumTerm s (FDBoolTerm s)) => EnumTerm (FDInstance s) ModelBool Source # 
(FDSolver s, EnumTerm s (FDIntTerm s)) => EnumTerm (FDInstance s) ModelInt Source # 

assignment :: (EnumTerm s t, MonadTree m, TreeSolver m ~ s) => t -> m (TermBaseType s t) Source #

assignments :: (EnumTerm s t, MonadTree m, TreeSolver m ~ s) => [t] -> m [TermBaseType s t] Source #

inOrder :: EnumTerm s t => [t] -> s [t] Source #

firstFail :: EnumTerm s t => [t] -> s [t] Source #

middleOut :: EnumTerm s t => [t] -> s [t] Source #

endsOut :: EnumTerm s t => [t] -> s [t] Source #

labelling :: (MonadTree m, TreeSolver m ~ s, EnumTerm s t) => ([t] -> s [t]) -> [t] -> m () Source #

levelList :: (Solver s, MonadTree m, TreeSolver m ~ s) => [m ()] -> m () Source #

enumerate :: (MonadTree m, TreeSolver m ~ s, EnumTerm s t) => [t] -> m () Source #