java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.NegTableCT
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Implementation of Compact Table for Negative Table algorithm described in
Extending Compact-Table to Negative and Short Tables Helene Verhaeghe, Christophe Lecoutre, Pierre Schaus
See The article.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanhasDuplicates(int[][] table) voidpost()Initializes the constraint when it is posted to the solver.voidPropagates the constraint.Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
NegTableCT
Negative Table constraint.Assignment of
x_0=v_0, x_1=v_1,...only valid if there does not exists a row(v_0, v_1, ...)in the table. The table represents the infeasible assignments for the variables.- Parameters:
x- the variables to constraint. x is not empty.table- the array of invalid solutions (second dimension must be of same size as the array x)
-
-
Method Details
-
hasDuplicates
-
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
-