Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::LinearExpressionData Struct Reference

#include <linear_expression_data.h>

Public Member Functions

LinearExpressionProto Proto () const
 Inline implementations.
 

Static Public Member Functions

static LinearExpressionData FromProto (const LinearExpressionProto &expr_proto)
 

Public Attributes

SparseCoefficientMap coeffs
 
double offset = 0.0
 

Detailed Description

Represents a linear expression in "raw ID" form.

The data storage is not interesting, this struct exists to provide helpers that go to/from the proto representation (via member functions) and the C++ model representations (via raw functions in constraints/util/model_util.h).

Definition at line 29 of file linear_expression_data.h.

Member Function Documentation

◆ FromProto()

LinearExpressionData operations_research::math_opt::LinearExpressionData::FromProto ( const LinearExpressionProto & expr_proto)
inlinestatic

This method assumes that expr_proto is in a valid state; see the inline comments for LinearExpressionProto for details.

Definition at line 56 of file linear_expression_data.h.

◆ Proto()

LinearExpressionProto operations_research::math_opt::LinearExpressionData::Proto ( ) const
inline

Inline implementations.

Definition at line 41 of file linear_expression_data.h.

Member Data Documentation

◆ coeffs

SparseCoefficientMap operations_research::math_opt::LinearExpressionData::coeffs

Definition at line 36 of file linear_expression_data.h.

◆ offset

double operations_research::math_opt::LinearExpressionData::offset = 0.0

Definition at line 37 of file linear_expression_data.h.


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