Google OR-Tools v9.11
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 192 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 1331 of file variable_and_expressions.h.
|
inline |
Definition at line 1338 of file variable_and_expressions.h.
|
inline |
Definition at line 1334 of file variable_and_expressions.h.
|
inline |
Definition at line 1343 of file variable_and_expressions.h.
double operations_research::math_opt::LinearTerm::coefficient |
Definition at line 203 of file variable_and_expressions.h.
Variable operations_research::math_opt::LinearTerm::variable |
Definition at line 202 of file variable_and_expressions.h.