public abstract class MultiBinaryConstraint extends MultiConstraint
MultiVariables.constraintsannotation, autoRemovable, color, id, logger, masked, numIDs, scope| Constructor and Description |
|---|
MultiBinaryConstraint()
Instantiates a new
MultiBinaryConstraint, sets its scope to have size 2. |
| Modifier and Type | Method and Description |
|---|---|
protected Constraint[] |
createInternalConstraints(Variable[] variables)
This method must be implemented by the implementing class, and should instantiate
the internal constraints underlying this
MultiConstraint. |
protected abstract Constraint[] |
createInternalConstraints(Variable from,
Variable to)
This method must be defined to create the internal constraints underlying
this
MultiBinaryConstraint. |
Variable |
getFrom()
Get the source
Variable of this MultiBinaryConstraint. |
Variable |
getTo()
Get the destination
Variable of this MultiBinaryConstraint. |
void |
setFrom(Variable mv)
Set the source
Variable of this MultiBinaryConstraint. |
void |
setTo(Variable mv)
Set the destination
Variable of this MultiBinaryConstraint. |
java.lang.String |
toString()
Every
Constraint should implement a toString method (used by the
ConstraintNetwork rendering methods). |
clone, getDescription, getInternalConstraints, propagateImmediately, setPropagateImmediately, setPropagateLatergetAnnotation, getColor, getEdgeLabel, getID, getScope, isAutoRemovable, isEquivalent, isMasked, isSkippableSolver, isUnary, mask, setAnnotation, setAutoRemovable, setColor, setScope, skipSolver, unmaskpublic MultiBinaryConstraint()
MultiBinaryConstraint, sets its scope to have size 2.protected Constraint[] createInternalConstraints(Variable[] variables)
MultiConstraintMultiConstraint.createInternalConstraints in class MultiConstraintvariables - The Variables that are in the scope of this MultiConstraint.MultiConstraint.protected abstract Constraint[] createInternalConstraints(Variable from, Variable to)
MultiBinaryConstraint.from - The source Variable of the MultiConstraint.to - The destination Variable of the MultiConstraint.MultiBinaryConstraint.public Variable getFrom()
Variable of this MultiBinaryConstraint.Variable of this MultiBinaryConstraint.public Variable getTo()
Variable of this MultiBinaryConstraint.Variable of this MultiBinaryConstraint.public void setFrom(Variable mv)
Variable of this MultiBinaryConstraint.mv - The source Variable of this MultiBinaryConstraint.public void setTo(Variable mv)
Variable of this MultiBinaryConstraint.mv - The destination Variable of this MultiBinaryConstraint.public java.lang.String toString()
ConstraintConstraint should implement a toString method (used by the
ConstraintNetwork rendering methods).toString in class ConstraintString representation of this Constraint.