java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.setvar.IsSubset
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Constraint that enforces a boolean variable is
true if one set is a subset of another set.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
IsSubset
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 variableset1- the first set than can be included in the second setset2- the second set
-
-
Method Details
-
post
public void post()Description copied from interface:CPConstraintInitializes the constraint when it is posted to the solver.- Specified by:
postin interfaceCPConstraint- Overrides:
postin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-