OR-Tools  8.2
LinearConstraintBuilder

Detailed Description

Definition at line 88 of file linear_constraint.h.

Public Member Functions

 LinearConstraintBuilder (const Model *model, IntegerValue lb, IntegerValue ub)
 
void AddTerm (IntegerVariable var, IntegerValue coeff)
 
void AddTerm (AffineExpression expr, IntegerValue coeff)
 
void AddConstant (IntegerValue value)
 
ABSL_MUST_USE_RESULT bool AddLiteralTerm (Literal lit, IntegerValue coeff)
 
LinearConstraint Build ()
 

Constructor & Destructor Documentation

◆ LinearConstraintBuilder()

LinearConstraintBuilder ( const Model model,
IntegerValue  lb,
IntegerValue  ub 
)
inline

Definition at line 94 of file linear_constraint.h.

Member Function Documentation

◆ AddConstant()

void AddConstant ( IntegerValue  value)

Definition at line 48 of file linear_constraint.cc.

◆ AddLiteralTerm()

ABSL_MUST_USE_RESULT bool AddLiteralTerm ( Literal  lit,
IntegerValue  coeff 
)

Definition at line 53 of file linear_constraint.cc.

◆ AddTerm() [1/2]

void AddTerm ( AffineExpression  expr,
IntegerValue  coeff 
)

Definition at line 33 of file linear_constraint.cc.

◆ AddTerm() [2/2]

void AddTerm ( IntegerVariable  var,
IntegerValue  coeff 
)

Definition at line 23 of file linear_constraint.cc.

◆ Build()

LinearConstraint Build ( )

Definition at line 114 of file linear_constraint.cc.


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