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

#include <model_builder_helper.h>

Inheritance diagram for operations_research::mb::ExprFlattener:
operations_research::mb::ExprVisitor

Public Member Functions

 ~ExprFlattener () override=default
 
void AddVarCoeff (std::shared_ptr< Variable > var, double coeff) override
 
double Flatten (std::vector< std::shared_ptr< Variable > > *vars, std::vector< double > *coeffs)
 
- Public Member Functions inherited from operations_research::mb::ExprVisitor
virtual ~ExprVisitor ()=default
 
void AddToProcess (std::shared_ptr< LinearExpr > expr, double coeff)
 Expression visitors.
 
void AddConstant (double constant)
 
void Clear ()
 

Additional Inherited Members

- Protected Attributes inherited from operations_research::mb::ExprVisitor
std::vector< std::pair< std::shared_ptr< LinearExpr >, double > > to_process_
 
double offset_ = 0
 

Detailed Description

Definition at line 101 of file model_builder_helper.h.

Constructor & Destructor Documentation

◆ ~ExprFlattener()

operations_research::mb::ExprFlattener::~ExprFlattener ( )
overridedefault

Member Function Documentation

◆ AddVarCoeff()

void operations_research::mb::ExprFlattener::AddVarCoeff ( std::shared_ptr< Variable > var,
double coeff )
overridevirtual

Implements operations_research::mb::ExprVisitor.

Definition at line 860 of file model_builder_helper.cc.

◆ Flatten()

double operations_research::mb::ExprFlattener::Flatten ( std::vector< std::shared_ptr< Variable > > * vars,
std::vector< double > * coeffs )

Definition at line 864 of file model_builder_helper.cc.


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