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
xis sorted inyaccording to permutationo:y[0] <= y[1] <= ... <= y[n-1]andx[i] = y[o[i]]for alli.- Parameters:
x- a set of n variableso- a permutation of 0..n-1, so thatx[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
-