public abstract class MultiConstraint extends Constraint
MultiConstraint is a constraint among Variables that could be MultiVariables.
Every MultiConstraint is "implemented" one or more lower-level
constraints - see, e.g., the AllenIntervalConstraint.| Modifier and Type | Field and Description |
|---|---|
protected Constraint[] |
constraints |
annotation, autoRemovable, color, id, logger, masked, numIDs, scope| Constructor and Description |
|---|
MultiConstraint()
Instantiates a
MultiConstraint. |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.Object |
clone()
A
MultiConstraint must be cloneable. |
protected abstract Constraint[] |
createInternalConstraints(Variable[] variables)
This method must be implemented by the implementing class, and should instantiate
the internal constraints underlying this
MultiConstraint. |
java.lang.String |
getDescription()
Get the description of this
Constraint's type. |
Constraint[] |
getInternalConstraints()
Get the lower-level constraints underlying of this
MultiConstraint. |
boolean |
propagateImmediately()
A
MultiConstraint can be scheduled for propagation immediately (as soon as it is added)
or later. |
void |
setPropagateImmediately()
Schedules this
MultiConstraint for immediate propagation. |
void |
setPropagateLater()
Delays the propagation of this
MultiConstraint. |
getAnnotation, getColor, getEdgeLabel, getID, getScope, isAutoRemovable, isEquivalent, isMasked, isSkippableSolver, isUnary, mask, setAnnotation, setAutoRemovable, setColor, setScope, skipSolver, toString, unmaskprotected Constraint[] constraints
public MultiConstraint()
MultiConstraint. This constructor must be called by the
constructor of the implementing class.protected abstract Constraint[] createInternalConstraints(Variable[] variables)
MultiConstraint.variables - The Variables that are in the scope of this MultiConstraint.MultiConstraint.public Constraint[] getInternalConstraints()
MultiConstraint.MultiConstraint.public abstract java.lang.Object clone()
MultiConstraint must be cloneable. This is used by the MultiConstraintSolver
class to instantiate proper constraints to delegate its underlying ConstraintSolvers.clone in class Constraintpublic void setPropagateLater()
MultiConstraint.public void setPropagateImmediately()
MultiConstraint for immediate propagation.public boolean propagateImmediately()
MultiConstraint can be scheduled for propagation immediately (as soon as it is added)
or later. This is used internally by the ConstraintSolver to delay propagation
of a MultiConstraint in cases where the underlying constraints should be propagated first.
By default, MultiConstraints are propagated immediately.true iff this constraint should be propagated as soon as possible.public java.lang.String getDescription()
ConstraintConstraint's type.getDescription in class ConstraintConstraint's type.