Module org.maxicp

Class AtLeastNValueDC

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

public class AtLeastNValueDC extends AbstractCPConstraint
Domain Consistency Filtering for AtLeastNValue constraint.
Author:
Pierre Schaus pschaus@gmail.com
  • Constructor Details

    • AtLeastNValueDC

      public AtLeastNValueDC(CPIntVar[] x, CPIntVar nVal)
    • AtLeastNValueDC

      public AtLeastNValueDC(CPIntVar[] x, CPIntVar nval, boolean dontPostFWC)
  • Method Details

    • post

      public void post()
      Description copied from interface: CPConstraint
      Initializes the constraint when it is posted to the solver.
      Specified by:
      post in interface CPConstraint
      Overrides:
      post in class AbstractCPConstraint
    • hasValInBestAssignment

      public boolean hasValInBestAssignment(int i)
    • getValInBestAssignment

      public int getValInBestAssignment(int i)
    • propagate

      public void propagate()
      Description copied from interface: CPConstraint
      Propagates the constraint.
      Specified by:
      propagate in interface CPConstraint
      Overrides:
      propagate in class AbstractCPConstraint