Class TableConstraint
java.lang.Object
com.google.ortools.sat.Constraint
com.google.ortools.sat.TableConstraint
Specialized assignment constraint.
This constraint allows adding tuples to the allowed/forbidden assignment constraint incrementally.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTuple
(int[] tuple) Adds a tuple of possible/forbidden values to the constraint.addTuple
(long[] tuple) Adds a tuple of possible/forbidden values to the constraint.addTuples
(int[][] tuples) Adds a list of tuples of possible/forbidden values to the constraint.addTuples
(long[][] tuples) Adds a list of tuples of possible/forbidden values to the constraint.Methods inherited from class com.google.ortools.sat.Constraint
getBuilder, getIndex, onlyEnforceIf, onlyEnforceIf
-
Constructor Details
-
TableConstraint
-
-
Method Details
-
addTuple
Adds a tuple of possible/forbidden values to the constraint.- Parameters:
tuple
- the tuple to add to the constraint.- Throws:
CpModel.WrongLength
- if the tuple does not have the same length as the array of expressions of the constraint.
-
addTuple
Adds a tuple of possible/forbidden values to the constraint.- Parameters:
tuple
- the tuple to add to the constraint.- Throws:
CpModel.WrongLength
- if the tuple does not have the same length as the array of expressions of the constraint.
-
addTuples
Adds a list of tuples of possible/forbidden values to the constraint.- Parameters:
tuples
- the list of tuples to add to the constraint.- Throws:
CpModel.WrongLength
- if one tuple does not have the same length as the array of variables of the constraint.
-
addTuples
Adds a list of tuples of possible/forbidden values to the constraint.- Parameters:
tuples
- the list of tuples to add to the constraint.- Throws:
CpModel.WrongLength
- if one tuple does not have the same length as the array of expressions of the constraint.
-