java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.InversePerm
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
InversePerm is a constraint that enforces that one permutation is the inverse of another.
This means that if x[i] = j, then y[j] = i for all i and j in the domain of the variables.
-
Constructor Summary
ConstructorsConstructorDescriptionInversePerm(CPIntVar[] x, CPIntVar[] y) Creates a constraint that enforces that one permutation is the inverse of another. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
InversePerm
Creates a constraint that enforces that one permutation is the inverse of another. This means that if x[i] = j, then y[j] = i for all i and j in the domain of the variables.- Parameters:
x- the first array of integer variables representing the permutationy- the second array of integer variables representing the inverse permutation
-
-
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
-