iterative-forward-search-0.1.0.0: An IFS constraint solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.IFS.Types

Synopsis

Documentation

type Var = Int Source #

Represents a variable

type Val = Int Source #

Represents a value

type CSPMonad r = ReaderT (CSP r) IO Source #

Monad used in the CSP solver

data CSP r Source #

Represents a contraint satisfaction problem

Constructors

MkCSP 

Fields

type Domains = IntMap IntSet Source #

Represents the domains for different variables. The variables are indexed by integers

type Variables = IntSet Source #

Represents the variables used in the timetabling problem

type Constraints = [(Variables, Assignment -> Bool)] Source #

Represents the constraints for the timetabling problem. The first element of the tuple represents the variables this constraint affects, the second is the constraint itself

type Assignment = IntMap Val Source #

Represents an assignment of variables

data Solution Source #

This is returned by the IFS. Complete indicates the assignment is complete, and Incomplete indicates the assignment is not complete

Instances

Instances details
Show Solution Source # 
Instance details

Defined in Data.IFS.Types

NFData Solution Source # 
Instance details

Defined in Data.IFS.Types

Methods

rnf :: Solution -> () #

fromSolution :: Solution -> Assignment Source #

fromSolution solution extracts an Assignment value from a Solution value