Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::LinearTerm Struct Reference

Detailed Description

Similar to AffineExpression, but with a zero constant. If coeff is zero, then this is always zero and var is ignored.

Definition at line 476 of file precedences.h.

#include <precedences.h>

Public Member Functions

 LinearTerm ()=default
 LinearTerm (IntegerVariable v, IntegerValue c)
void MakeCoeffPositive ()
bool operator== (const LinearTerm &other) const

Public Attributes

IntegerVariable var = kNoIntegerVariable
IntegerValue coeff = IntegerValue(0)

Constructor & Destructor Documentation

◆ LinearTerm() [1/2]

operations_research::sat::LinearTerm::LinearTerm ( )
default

◆ LinearTerm() [2/2]

operations_research::sat::LinearTerm::LinearTerm ( IntegerVariable v,
IntegerValue c )
inline

Definition at line 478 of file precedences.h.

Member Function Documentation

◆ MakeCoeffPositive()

void operations_research::sat::LinearTerm::MakeCoeffPositive ( )
inline

Definition at line 480 of file precedences.h.

◆ operator==()

bool operations_research::sat::LinearTerm::operator== ( const LinearTerm & other) const
inline

Definition at line 487 of file precedences.h.

Member Data Documentation

◆ coeff

IntegerValue operations_research::sat::LinearTerm::coeff = IntegerValue(0)

Definition at line 492 of file precedences.h.

◆ var

IntegerVariable operations_research::sat::LinearTerm::var = kNoIntegerVariable

Definition at line 491 of file precedences.h.


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