jp.ac.kobe_u.cs.sugar.csp
Class RelationLiteral
java.lang.Object
jp.ac.kobe_u.cs.sugar.csp.Literal
jp.ac.kobe_u.cs.sugar.csp.RelationLiteral
public class RelationLiteral
- extends Literal
This class implements a literal for relations.
- See Also:
CSP
arity
public int arity
conflicts
public boolean conflicts
vs
public IntegerVariable[] vs
RelationLiteral
public RelationLiteral(int arity,
boolean conflicts,
int[][] tuples,
IntegerVariable[] vs)
isSimple
public boolean isSimple()
- Description copied from class:
Literal
- 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.
- Specified by:
isSimple
in class Literal
- Returns:
- true when the literal is simple
isValid
public boolean isValid()
throws SugarException
- Specified by:
isValid
in class Literal
- Throws:
SugarException
isUnsatisfiable
public boolean isUnsatisfiable()
throws SugarException
- Specified by:
isUnsatisfiable
in class Literal
- Throws:
SugarException
propagate
public int propagate()
throws SugarException
- Specified by:
propagate
in class Literal
- Throws:
SugarException
encode
public void encode(Encoder encoder,
int[] clause0)
throws SugarException,
IOException
- Specified by:
encode
in class Literal
- Throws:
SugarException
IOException
isSatisfied
public boolean isSatisfied()
- Description copied from class:
Literal
- Returns true when the literal is satisfied.
- Specified by:
isSatisfied
in class Literal
- Returns:
- true when the literal is satisfied
toString
public String toString()
- Overrides:
toString
in class Object
Sugar: A SAT-based Constraint Solver