public class TableConstraint extends Constraint
This constraint allows adding tuples to the allowed/forbidden assignment constraint incrementally.
| Constructor and Description |
|---|
TableConstraint(CpModelProto.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
TableConstraint |
addTuple(int[] tuple)
Adds a tuple of possible/forbidden values to the constraint.
|
TableConstraint |
addTuple(long[] tuple)
Adds a tuple of possible/forbidden values to the constraint.
|
TableConstraint |
addTuples(int[][] tuples)
Adds a list of tuples of possible/forbidden values to the constraint.
|
TableConstraint |
addTuples(long[][] tuples)
Adds a list of tuples of possible/forbidden values to the constraint.
|
getBuilder, getIndex, onlyEnforceIf, onlyEnforceIfpublic TableConstraint(CpModelProto.Builder builder)
public TableConstraint addTuple(int[] tuple)
tuple - the tuple to add to the constraint.CpModel.WrongLength - if the tuple does not have the same length as the array of
variables of the constraint.public TableConstraint addTuple(long[] tuple)
tuple - the tuple to add to the constraint.CpModel.WrongLength - if the tuple does not have the same length as the array of
variables of the constraint.public TableConstraint addTuples(int[][] tuples)
tuples - the list of tuples to add to the constraint.CpModel.WrongLength - if one tuple does not have the same length as the array of
variables of the constraint.public TableConstraint addTuples(long[][] tuples)
tuples - the list of tuples to add to the constraint.CpModel.WrongLength - if one tuple does not have the same length as the array of
variables of the constraint.Copyright © 2024. All rights reserved.