![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
A class to hold a weighted sum of floating point linear expressions. More...
#include <model_builder_helper.h>
Public Member Functions | |
WeightedSumArray (const std::vector< std::shared_ptr< LinearExpr > > &exprs, const std::vector< double > &coeffs, double offset) | |
~WeightedSumArray () override=default | |
void | Visit (ExprVisitor &lin, double c) override |
std::string | ToString () const override |
std::string | DebugString () const override |
![]() | |
virtual | ~LinearExpr ()=default |
std::shared_ptr< LinearExpr > | Add (std::shared_ptr< LinearExpr > expr) |
std::shared_ptr< LinearExpr > | AddFloat (double cst) |
std::shared_ptr< LinearExpr > | Sub (std::shared_ptr< LinearExpr > expr) |
std::shared_ptr< LinearExpr > | SubFloat (double cst) |
std::shared_ptr< LinearExpr > | RSubFloat (double cst) |
std::shared_ptr< LinearExpr > | MulFloat (double cst) |
std::shared_ptr< LinearExpr > | Neg () |
std::shared_ptr< BoundedLinearExpression > | Eq (std::shared_ptr< LinearExpr > rhs) |
std::shared_ptr< BoundedLinearExpression > | EqCst (double rhs) |
std::shared_ptr< BoundedLinearExpression > | Ge (std::shared_ptr< LinearExpr > rhs) |
std::shared_ptr< BoundedLinearExpression > | GeCst (double rhs) |
std::shared_ptr< BoundedLinearExpression > | Le (std::shared_ptr< LinearExpr > rhs) |
std::shared_ptr< BoundedLinearExpression > | LeCst (double rhs) |
Additional Inherited Members | |
![]() | |
static std::shared_ptr< LinearExpr > | Term (std::shared_ptr< LinearExpr > expr, double coeff) |
Expressions. | |
static std::shared_ptr< LinearExpr > | Affine (std::shared_ptr< LinearExpr > expr, double coeff, double constant) |
static std::shared_ptr< LinearExpr > | AffineCst (double value, double coeff, double constant) |
static std::shared_ptr< LinearExpr > | Constant (double value) |
A class to hold a weighted sum of floating point linear expressions.
Definition at line 215 of file model_builder_helper.h.
operations_research::mb::WeightedSumArray::WeightedSumArray | ( | const std::vector< std::shared_ptr< LinearExpr > > & | exprs, |
const std::vector< double > & | coeffs, | ||
double | offset ) |
Definition at line 1006 of file model_builder_helper.cc.
|
overridedefault |
|
overridevirtual |
Implements operations_research::mb::LinearExpr.
Definition at line 1066 of file model_builder_helper.cc.
|
overridevirtual |
If there are no terms, just print the offset.
If there is an offset, print it.
Implements operations_research::mb::LinearExpr.
Definition at line 1020 of file model_builder_helper.cc.
|
overridevirtual |
Implements operations_research::mb::LinearExpr.
Definition at line 1013 of file model_builder_helper.cc.