Module org.maxicp

Class AtLeastNValueFWC

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.AtLeastNValueFWC
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>
Direct Known Subclasses:
AllDifferentFWC

public class AtLeastNValueFWC extends AbstractCPConstraint
Forward Checking filtering for the AtLeastNValue constraint.

Enforces that the number of distinct values taken by the variables in x is at least nValue: |{x[i] | 0 <= i < x.length}| >= nValue.

  • Constructor Details

    • AtLeastNValueFWC

      public AtLeastNValueFWC(CPIntVar[] x, CPIntVar nValue)
      The number of values that are used in the array x is at least nValue: #{x[i] | i in 0..x.length-1} >= nValue.
      Parameters:
      x - array of variables
      nValue - the number of values that are used in the array x is at least nValue
  • Method Details