Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::mb::AffineExpr Class Reference

A class to hold linear_expr * a = b. More...

#include <model_builder_helper.h>

Inheritance diagram for operations_research::mb::AffineExpr:
operations_research::mb::LinearExpr

Public Member Functions

 AffineExpr (std::shared_ptr< LinearExpr > expr, double coeff, double offset)
 
 ~AffineExpr () override=default
 
void Visit (ExprVisitor &lin, double c) override
 
std::string ToString () const override
 
std::string DebugString () const override
 
std::shared_ptr< LinearExprexpression () const
 
double coefficient () const
 
double offset () const
 
std::shared_ptr< LinearExprAddFloat (double cst)
 
std::shared_ptr< LinearExprSubFloat (double cst)
 
std::shared_ptr< LinearExprRSubFloat (double cst)
 
std::shared_ptr< LinearExprMulFloat (double cst)
 
std::shared_ptr< LinearExprNeg ()
 
- Public Member Functions inherited from operations_research::mb::LinearExpr
virtual ~LinearExpr ()=default
 
std::shared_ptr< LinearExprAdd (std::shared_ptr< LinearExpr > expr)
 
std::shared_ptr< LinearExprAddFloat (double cst)
 
std::shared_ptr< LinearExprSub (std::shared_ptr< LinearExpr > expr)
 
std::shared_ptr< LinearExprSubFloat (double cst)
 
std::shared_ptr< LinearExprRSubFloat (double cst)
 
std::shared_ptr< LinearExprMulFloat (double cst)
 
std::shared_ptr< LinearExprNeg ()
 
std::shared_ptr< BoundedLinearExpressionEq (std::shared_ptr< LinearExpr > rhs)
 
std::shared_ptr< BoundedLinearExpressionEqCst (double rhs)
 
std::shared_ptr< BoundedLinearExpressionGe (std::shared_ptr< LinearExpr > rhs)
 
std::shared_ptr< BoundedLinearExpressionGeCst (double rhs)
 
std::shared_ptr< BoundedLinearExpressionLe (std::shared_ptr< LinearExpr > rhs)
 
std::shared_ptr< BoundedLinearExpressionLeCst (double rhs)
 

Additional Inherited Members

- Static Public Member Functions inherited from operations_research::mb::LinearExpr
static std::shared_ptr< LinearExprTerm (std::shared_ptr< LinearExpr > expr, double coeff)
 Expressions.
 
static std::shared_ptr< LinearExprAffine (std::shared_ptr< LinearExpr > expr, double coeff, double constant)
 
static std::shared_ptr< LinearExprAffineCst (double value, double coeff, double constant)
 
static std::shared_ptr< LinearExprConstant (double value)
 

Detailed Description

A class to hold linear_expr * a = b.

Definition at line 232 of file model_builder_helper.h.

Constructor & Destructor Documentation

◆ AffineExpr()

operations_research::mb::AffineExpr::AffineExpr ( std::shared_ptr< LinearExpr > expr,
double coeff,
double offset )

Definition at line 1076 of file model_builder_helper.cc.

◆ ~AffineExpr()

operations_research::mb::AffineExpr::~AffineExpr ( )
overridedefault

Member Function Documentation

◆ AddFloat()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::AddFloat ( double cst)

Definition at line 1085 of file model_builder_helper.cc.

◆ coefficient()

double operations_research::mb::AffineExpr::coefficient ( ) const
inline

Definition at line 243 of file model_builder_helper.h.

◆ DebugString()

std::string operations_research::mb::AffineExpr::DebugString ( ) const
overridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 1127 of file model_builder_helper.cc.

◆ expression()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::expression ( ) const
inline

Definition at line 242 of file model_builder_helper.h.

◆ MulFloat()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::MulFloat ( double cst)

Definition at line 1099 of file model_builder_helper.cc.

◆ Neg()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::Neg ( )

Definition at line 1105 of file model_builder_helper.cc.

◆ offset()

double operations_research::mb::AffineExpr::offset ( ) const
inline

Definition at line 244 of file model_builder_helper.h.

◆ RSubFloat()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::RSubFloat ( double cst)

Definition at line 1095 of file model_builder_helper.cc.

◆ SubFloat()

std::shared_ptr< LinearExpr > operations_research::mb::AffineExpr::SubFloat ( double cst)

Definition at line 1090 of file model_builder_helper.cc.

◆ ToString()

std::string operations_research::mb::AffineExpr::ToString ( ) const
overridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 1109 of file model_builder_helper.cc.

◆ Visit()

void operations_research::mb::AffineExpr::Visit ( ExprVisitor & lin,
double c )
overridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 1080 of file model_builder_helper.cc.


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