public class TableCT extends AbstractConstraint
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 and Description |
---|
TableCT(IntVar[] x,
int[][] table)
Table constraint.
|
Modifier and Type | Method and Description |
---|---|
void |
post()
Initializes the constraint when it is posted to the solver.
|
void |
propagate()
Propagates the constraint.
|
getSolver, isActive, isScheduled, setActive, setScheduled
public TableCT(IntVar[] x, int[][] table)
The table constraint ensures that
x
is a row from the given table.
More exactly, there exist some row i
such that
x[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.
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.public void post()
Constraint
post
in interface Constraint
post
in class AbstractConstraint
public void propagate()
Constraint
propagate
in interface Constraint
propagate
in class AbstractConstraint
Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.