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

#include <model_builder_helper.h>

Inheritance diagram for operations_research::mb::SumArray:
operations_research::mb::LinearExpr

Public Member Functions

 SumArray (std::vector< std::shared_ptr< LinearExpr > > exprs, double offset)
 
 ~SumArray () override=default
 
void Visit (ExprVisitor &lin, double c) override
 
std::string ToString () const override
 
std::string DebugString () const override
 
void AddInPlace (std::shared_ptr< LinearExpr > expr)
 
void AddFloatInPlace (double cst)
 
int num_exprs () const
 
double offset () const
 
- 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 a sum of linear expressions, and optional integer and double offsets.

Definition at line 150 of file model_builder_helper.h.

Constructor & Destructor Documentation

◆ SumArray()

operations_research::mb::SumArray::SumArray ( std::vector< std::shared_ptr< LinearExpr > > exprs,
double offset )
inlineexplicit

Definition at line 152 of file model_builder_helper.h.

◆ ~SumArray()

operations_research::mb::SumArray::~SumArray ( )
overridedefault

Member Function Documentation

◆ AddFloatInPlace()

void operations_research::mb::SumArray::AddFloatInPlace ( double cst)
inline

Definition at line 205 of file model_builder_helper.h.

◆ AddInPlace()

void operations_research::mb::SumArray::AddInPlace ( std::shared_ptr< LinearExpr > expr)
inline

Definition at line 204 of file model_builder_helper.h.

◆ DebugString()

std::string operations_research::mb::SumArray::DebugString ( ) const
inlineoverridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 190 of file model_builder_helper.h.

◆ num_exprs()

int operations_research::mb::SumArray::num_exprs ( ) const
inline

Definition at line 206 of file model_builder_helper.h.

◆ offset()

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

Definition at line 207 of file model_builder_helper.h.

◆ ToString()

std::string operations_research::mb::SumArray::ToString ( ) const
inlineoverridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 166 of file model_builder_helper.h.

◆ Visit()

void operations_research::mb::SumArray::Visit ( ExprVisitor & lin,
double c )
inlineoverridevirtual

Implements operations_research::mb::LinearExpr.

Definition at line 157 of file model_builder_helper.h.


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