omnics.constraint
Class BinaryIntConstraint
java.lang.Object
omnics.Constraint
omnics.constraint.BinaryConstraint
omnics.constraint.BinaryIntConstraint
- All Implemented Interfaces:
- java.io.Serializable
public abstract class BinaryIntConstraint
- extends BinaryConstraint
Convenience abstract class that enforces a binary constraint defined on
integer variables.
It exposes for subclasses the variables x,y and their
indices xIndex, yIndex
- Author:
- Cristian Frasinaru
- See Also:
- Serialized Form
|
Method Summary |
abstract int |
eval(int a,
int b)
This is the method that evaluates the tuple (x=a,y=b), where a and b are
primitive integers. |
int |
eval(java.lang.Object a,
java.lang.Object b)
This method assumes that a and b are integers and transfers the control
to eval(int, int) |
| Methods inherited from class omnics.Constraint |
eval, getFilter, getName, getProblem, getTuples, getVarArray, getVariables, setFilter, setName, setVariables, setVariables, toString, variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryIntConstraint
public BinaryIntConstraint(Var x,
Var y)
- Creates a new instance of BinaryIntConstraint
eval
public int eval(java.lang.Object a,
java.lang.Object b)
- This method assumes that a and b are integers and transfers the control
to eval(int, int)
- Specified by:
eval in class BinaryConstraint
eval
public abstract int eval(int a,
int b)
- This is the method that evaluates the tuple (x=a,y=b), where a and b are
primitive integers.
Must be implemented in the subclasses.