public class TableDecomp extends AbstractConstraint
| Constructor and Description |
|---|
TableDecomp(IntVar[] x,
int[][] table)
Decomposition of a 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, setScheduledpublic TableDecomp(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()
Constraintpost in interface Constraintpost in class AbstractConstraintpublic void propagate()
Constraintpropagate in interface Constraintpropagate in class AbstractConstraintCopyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.