java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.Sorted
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Sorted constraint, x is sorted in y according to permutation o
- Author:
- pschaus
-
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
-
Sorted
x is sorted in y according to permutation o y[0] invalid input: '<'= y[1] invalid input: '<'= ... invalid input: '<'= y[n-1] x[i] = y[o[i]] for all i- Parameters:
x- a set of n variableso- a permutation of 0..n-1, so that x[i] = y[o[i]]y- a set of n variables, y[i] is the ith smallest value of x
-
-
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
-