Module org.maxicp

Class InversePerm

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.InversePerm
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class InversePerm extends AbstractCPConstraint
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 Details

    • InversePerm

      public InversePerm(CPIntVar[] x, CPIntVar[] y)
      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 permutation
      y - the second array of integer variables representing the inverse permutation
  • Method Details