![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
A term in an sum of variables multiplied by coefficients. More...
#include <variable_and_expressions.h>
Public Member Functions | |
LinearTerm (Variable variable, double coefficient) | |
LinearTerm | operator- () const |
LinearTerm & | operator*= (double d) |
LinearTerm & | operator/= (double d) |
Public Attributes | |
Variable | variable |
double | coefficient |
A term in an sum of variables multiplied by coefficients.
Definition at line 170 of file variable_and_expressions.h.
|
inline |
Usually this constructor is never called explicitly by users. Instead it will be implicitly used when writing linear expression. For example x + / 2*y will automatically use this constructor to build a LinearTerm from x and the overload of the operator* will also automatically create the one from 2*y.
Definition at line 1264 of file variable_and_expressions.h.
|
inline |
Definition at line 1271 of file variable_and_expressions.h.
|
inline |
Definition at line 1267 of file variable_and_expressions.h.
|
inline |
Definition at line 1276 of file variable_and_expressions.h.
double operations_research::math_opt::LinearTerm::coefficient |
Definition at line 181 of file variable_and_expressions.h.
Variable operations_research::math_opt::LinearTerm::variable |
Definition at line 180 of file variable_and_expressions.h.