Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.TableConstraint Class Reference

Specialized assignment constraint. More...

Inheritance diagram for Google.OrTools.Sat.TableConstraint:
Google.OrTools.Sat.Constraint

Public Member Functions

 TableConstraint (CpModelProto model)
 
TableConstraint AddTuple (IEnumerable< int > tuple)
 Adds a tuple of possible/forbidden values to the constraint.
 
TableConstraint AddTuple (IEnumerable< long > tuple)
 Adds a tuple of possible/forbidden values to the constraint.
 
TableConstraint AddTuples (int[,] tuples)
 Adds a set of tuples of possible/forbidden values to the constraint.
 
TableConstraint AddTuples (long[,] tuples)
 Adds a set of tuples of possible/forbidden values to the constraint.
 
- Public Member Functions inherited from Google.OrTools.Sat.Constraint
 Constraint (CpModelProto model)
 
void OnlyEnforceIf (ILiteral lit)
 Adds a literal to the constraint.
 
void OnlyEnforceIf (ILiteral[] lits)
 Adds a list of literals to the constraint.
 

Additional Inherited Members

- Properties inherited from Google.OrTools.Sat.Constraint
int Index [get]
 The index of the constraint in the model.
 
ConstraintProto Proto [get, set]
 The underlying constraint proto.
 

Detailed Description

Specialized assignment constraint.

This constraint allows adding tuples to the allowed/forbidden assignment constraint incrementally.

Definition at line 151 of file Constraints.cs.

Constructor & Destructor Documentation

◆ TableConstraint()

Google.OrTools.Sat.TableConstraint.TableConstraint ( CpModelProto model)
inline

Definition at line 153 of file Constraints.cs.

Member Function Documentation

◆ AddTuple() [1/2]

TableConstraint Google.OrTools.Sat.TableConstraint.AddTuple ( IEnumerable< int > tuple)
inline

Adds a tuple of possible/forbidden values to the constraint.

Parameters
tuplethe tuple to add to the constraint
Exceptions
ArgumentExceptionif the tuple does not have the same length as the array of variables of the constraint

Definition at line 166 of file Constraints.cs.

◆ AddTuple() [2/2]

TableConstraint Google.OrTools.Sat.TableConstraint.AddTuple ( IEnumerable< long > tuple)
inline

Adds a tuple of possible/forbidden values to the constraint.

Parameters
tuplethe tuple to add to the constraint
Exceptions
ArgumentExceptionif the tuple does not have the same length as the array of variables of the constraint

Definition at line 192 of file Constraints.cs.

◆ AddTuples() [1/2]

TableConstraint Google.OrTools.Sat.TableConstraint.AddTuples ( int tuples[,])
inline

Adds a set of tuples of possible/forbidden values to the constraint.

Parameters
tuplesthe set of tuple to add to the constraint
Exceptions
ArgumentExceptionif the tuple does not have the same length as the array of variables of the constraint

Definition at line 218 of file Constraints.cs.

◆ AddTuples() [2/2]

TableConstraint Google.OrTools.Sat.TableConstraint.AddTuples ( long tuples[,])
inline

Adds a set of tuples of possible/forbidden values to the constraint.

Parameters
tuplesthe set of tuple to add to the constraint
Exceptions
ArgumentExceptionif the tuple does not have the same length as the array of variables of the constraint

Definition at line 246 of file Constraints.cs.


The documentation for this class was generated from the following file: