Module org.maxicp

Class Absolute

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

public class Absolute extends AbstractCPConstraint
Absolute value constraint
  • Constructor Details

    • Absolute

      public Absolute(CPIntVar x, CPIntVar y)
      Creates the absolute value constraint y = |x|.
      Parameters:
      x - the input variable such that its absolut value is equal to y
      y - the variable that represents the absolute value of x
  • Method Details