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

A class to hold a linear expression with bounds. More...

#include <model_builder_helper.h>

Public Member Functions

 BoundedLinearExpression (std::shared_ptr< LinearExpr > expr, double lower_bound, double upper_bound)
 
 BoundedLinearExpression (std::shared_ptr< LinearExpr > pos, std::shared_ptr< LinearExpr > neg, double lower_bound, double upper_bound)
 
 BoundedLinearExpression (std::shared_ptr< LinearExpr > expr, int64_t lower_bound, int64_t upper_bound)
 
 BoundedLinearExpression (std::shared_ptr< LinearExpr > pos, std::shared_ptr< LinearExpr > neg, int64_t lower_bound, int64_t upper_bound)
 
 ~BoundedLinearExpression ()=default
 
double lower_bound () const
 
double upper_bound () const
 
const std::vector< std::shared_ptr< Variable > > & vars () const
 
const std::vector< double > & coeffs () const
 
std::string ToString () const
 
std::string DebugString () const
 
bool CastToBool (bool *result) const
 

Detailed Description

A class to hold a linear expression with bounds.

Definition at line 322 of file model_builder_helper.h.

Constructor & Destructor Documentation

◆ BoundedLinearExpression() [1/4]

operations_research::mb::BoundedLinearExpression::BoundedLinearExpression ( std::shared_ptr< LinearExpr > expr,
double lower_bound,
double upper_bound )

Definition at line 1262 of file model_builder_helper.cc.

◆ BoundedLinearExpression() [2/4]

operations_research::mb::BoundedLinearExpression::BoundedLinearExpression ( std::shared_ptr< LinearExpr > pos,
std::shared_ptr< LinearExpr > neg,
double lower_bound,
double upper_bound )

Definition at line 1271 of file model_builder_helper.cc.

◆ BoundedLinearExpression() [3/4]

operations_research::mb::BoundedLinearExpression::BoundedLinearExpression ( std::shared_ptr< LinearExpr > expr,
int64_t lower_bound,
int64_t upper_bound )

Definition at line 1281 of file model_builder_helper.cc.

◆ BoundedLinearExpression() [4/4]

operations_research::mb::BoundedLinearExpression::BoundedLinearExpression ( std::shared_ptr< LinearExpr > pos,
std::shared_ptr< LinearExpr > neg,
int64_t lower_bound,
int64_t upper_bound )

Definition at line 1291 of file model_builder_helper.cc.

◆ ~BoundedLinearExpression()

operations_research::mb::BoundedLinearExpression::~BoundedLinearExpression ( )
default

Member Function Documentation

◆ CastToBool()

bool operations_research::mb::BoundedLinearExpression::CastToBool ( bool * result) const

Definition at line 1375 of file model_builder_helper.cc.

◆ coeffs()

const std::vector< double > & operations_research::mb::BoundedLinearExpression::coeffs ( ) const

Definition at line 1307 of file model_builder_helper.cc.

◆ DebugString()

std::string operations_research::mb::BoundedLinearExpression::DebugString ( ) const

Definition at line 1364 of file model_builder_helper.cc.

◆ lower_bound()

double operations_research::mb::BoundedLinearExpression::lower_bound ( ) const

Definition at line 1301 of file model_builder_helper.cc.

◆ ToString()

std::string operations_research::mb::BoundedLinearExpression::ToString ( ) const

Definition at line 1310 of file model_builder_helper.cc.

◆ upper_bound()

double operations_research::mb::BoundedLinearExpression::upper_bound ( ) const

Definition at line 1302 of file model_builder_helper.cc.

◆ vars()

const std::vector< std::shared_ptr< Variable > > & operations_research::mb::BoundedLinearExpression::vars ( ) const

Definition at line 1303 of file model_builder_helper.cc.


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