java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.LexLe
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Global lexicographic ordering constraint between two vectors x and y:
enforces
x <=_lex y (when strict == false) or x <_lex y (when strict == true).
Achieves Generalized Arc Consistency (GAC) based on Frisch et al. (CP 2002).-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
LexLe
Creates a lexicographic ordering constraint between two arrays of variablesxandy.- Parameters:
x- the first array of variablesy- the second array of variables (must have the same length asx)strict- iftrue, enforcesx <_lex y; otherwise enforcesx <=_lex y
-
LexLe
Creates a non-strict lexicographic ordering constraintx <=_lex y.- Parameters:
x- the first array of variablesy- the second array of variables (must have the same length asx)
-
-
Method Details
-
post
public void post()Description copied from interface:CPConstraintInitializes the constraint when it is posted to the solver.- Specified by:
postin interfaceCPConstraint- Overrides:
postin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-