java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.TableCT
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Implementation of Compact Table algorithm described in
Compact-Table: Efficiently Filtering Table Constraints with Reversible Sparse Bit-Sets Jordan Demeulenaere, Renaud Hartert, Christophe Lecoutre, Guillaume Perez, Laurent Perron, Jean-Charles Régin, Pierre Schaus
See The article.
-
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
-
TableCT
Table constraint.The table constraint ensures that
xis a row from the given table. More exactly, there exist some row i such thatx[0]==table[i][0], x[1]==table[i][1], etc.This constraint is sometimes called in extension constraint as the user enumerates the set of solutions that can be taken by the variables.
- Parameters:
x- the non-empty set of variables to constrainttable- the possible set of solutions for x. The second dimension must be of the same size as the array x.
-
-
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
-