jp.ac.kobe_u.cs.sugar.csp
Class Literal
java.lang.Object
jp.ac.kobe_u.cs.sugar.csp.Literal
- Direct Known Subclasses:
- BooleanLiteral, LinearLiteral, PowerLiteral, ProductLiteral, RelationLiteral
public abstract class Literal
- extends Object
This is an abstract class for literals of CSP.
- See Also:
CSP
Literal
public Literal()
getVariables
public Set<IntegerVariable> getVariables()
getBound
public int[] getBound(IntegerVariable v)
throws SugarException
- Throws:
SugarException
isSimple
public abstract boolean isSimple()
- Returns true when the literal is simple.
A literal is simple when it is a boolean literal or
a comparison literal with at most one integer variable.
- Returns:
- true when the literal is simple
isValid
public abstract boolean isValid()
throws SugarException
- Throws:
SugarException
isUnsatisfiable
public abstract boolean isUnsatisfiable()
throws SugarException
- Throws:
SugarException
propagate
public abstract int propagate()
throws SugarException
- Throws:
SugarException
getCode
public int getCode()
throws SugarException
- Throws:
SugarException
encode
public abstract void encode(Encoder encoder,
int[] clause)
throws SugarException,
IOException
- Throws:
SugarException
IOException
isSatisfied
public abstract boolean isSatisfied()
- Returns true when the literal is satisfied.
- Returns:
- true when the literal is satisfied
Sugar: A SAT-based Constraint Solver