Module org.maxicp

Class IsSubset

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

public class IsSubset extends AbstractCPConstraint
Constraint that enforces a boolean variable is true if one set is a subset of another set.
  • Constructor Details

    • IsSubset

      public IsSubset(CPBoolVar b, CPSetVar set1, CPSetVar set2)
      Creates a constraint that enforces the boolean variable b to be true if and only set1 is a subset (not necessarily strict) of set2 .
      Parameters:
      b - the boolean variable
      set1 - the first set than can be included in the second set
      set2 - the second set
  • Method Details