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

A linear expression that containing variables and constants. More...

#include <model_builder_helper.h>

Inheritance diagram for operations_research::mb::LinearExpr:
operations_research::mb::AffineExpr operations_research::mb::FixedValue operations_research::mb::FlatExpr operations_research::mb::SumArray operations_research::mb::Variable operations_research::mb::WeightedSumArray

Public Member Functions

virtual ~LinearExpr ()=default
 
virtual void Visit (ExprVisitor &, double)=0
 
virtual std::string ToString () const =0
 
virtual std::string DebugString () const =0
 
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)
 

Static Public Member Functions

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 linear expression that containing variables and constants.

Definition at line 50 of file model_builder_helper.h.

Constructor & Destructor Documentation

◆ ~LinearExpr()

virtual operations_research::mb::LinearExpr::~LinearExpr ( )
virtualdefault

Member Function Documentation

◆ Add()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::Add ( std::shared_ptr< LinearExpr > expr)

Definition at line 808 of file model_builder_helper.cc.

◆ AddFloat()

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

Definition at line 815 of file model_builder_helper.cc.

◆ Affine()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::Affine ( std::shared_ptr< LinearExpr > expr,
double coeff,
double constant )
static

Definition at line 793 of file model_builder_helper.cc.

◆ AffineCst()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::AffineCst ( double value,
double coeff,
double constant )
static

Definition at line 799 of file model_builder_helper.cc.

◆ Constant()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::Constant ( double value)
static

Definition at line 804 of file model_builder_helper.cc.

◆ DebugString()

◆ Eq()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::Eq ( std::shared_ptr< LinearExpr > rhs)

Definition at line 1131 of file model_builder_helper.cc.

◆ EqCst()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::EqCst ( double rhs)

Definition at line 1137 of file model_builder_helper.cc.

◆ Ge()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::Ge ( std::shared_ptr< LinearExpr > rhs)

Definition at line 1153 of file model_builder_helper.cc.

◆ GeCst()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::GeCst ( double rhs)

Definition at line 1159 of file model_builder_helper.cc.

◆ Le()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::Le ( std::shared_ptr< LinearExpr > rhs)

Definition at line 1142 of file model_builder_helper.cc.

◆ LeCst()

std::shared_ptr< BoundedLinearExpression > operations_research::mb::LinearExpr::LeCst ( double rhs)

Definition at line 1148 of file model_builder_helper.cc.

◆ MulFloat()

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

Definition at line 837 of file model_builder_helper.cc.

◆ Neg()

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

Definition at line 843 of file model_builder_helper.cc.

◆ RSubFloat()

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

Definition at line 833 of file model_builder_helper.cc.

◆ Sub()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::Sub ( std::shared_ptr< LinearExpr > expr)

Definition at line 820 of file model_builder_helper.cc.

◆ SubFloat()

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

Definition at line 828 of file model_builder_helper.cc.

◆ Term()

std::shared_ptr< LinearExpr > operations_research::mb::LinearExpr::Term ( std::shared_ptr< LinearExpr > expr,
double coeff )
static

Expressions.

Definition at line 788 of file model_builder_helper.cc.

◆ ToString()

◆ Visit()


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