A monad for implemented bounded depthfirstsearch and branchandbound search.
 class Monad m => MonadCost c m  m > c where
 updateCost :: (c > c) > m ()
 newtype UnboundedDFS c a = UnboundedDFS {
 runUnboundedDFS :: Maybe a
 newtype BoundedDFS c a = BoundedDFS {
 unBoundedDFS :: ReaderT (c > Bool) (StateT c Maybe) a
 runBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe (a, c)
 evalBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe a
 execBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe c
 newtype BranchAndBound c a = BranchAndBound {
 unBranchAndBound :: ReaderT (c > Bool) (StateT c Maybe) a
 runBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe (a, c)
 evalBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe a
 execBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe c
Costful operations
class Monad m => MonadCost c m  m > c whereSource
A monad with integer operation cost recording.
updateCost :: (c > c) > m ()Source
Mark the cost of the current operation.
MonadCost c (BranchAndBound c)  
MonadCost c (BoundedDFS c)  
MonadCost c (UnboundedDFS c) 
Unbounded depthfirstsearch
newtype UnboundedDFS c a Source
An unbounded depthfirst search monad for searches formulated using MonadPlus.
MonadCost c (UnboundedDFS c)  
Monad (UnboundedDFS c)  
MonadPlus (UnboundedDFS c) 
Bounded depthfirstsearch
newtype BoundedDFS c a Source
A cost bounded depthfirst search monad.
All choices are handled committing and there is no differentiation between failure due to cost overrun and other failures.
BoundedDFS  

MonadCost c (BoundedDFS c)  
Monad (BoundedDFS c)  
MonadPlus (BoundedDFS c) 
runBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe (a, c)Source
Run a cost bounded depthfirst search.
evalBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe aSource
Evaluate a cost bounded depthfirst search.
execBoundedDFS :: BoundedDFS c a > (c > Bool) > c > Maybe cSource
Execute a cost bounded depthfirst search.
Branchandbound search
newtype BranchAndBound c a Source
A branch and bound monad for finding results with the smallest costs.
BranchAndBound  

MonadCost c (BranchAndBound c)  
Monad (BranchAndBound c)  
Cost c => MonadPlus (BranchAndBound c) 
runBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe (a, c)Source
Run a branch and bound search.
evalBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe aSource
Evaluate a branch and bound search.
execBranchAndBound :: Cost c => BranchAndBound c a > c > Maybe cSource
Execute a branch and bound search.