Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::SparseCoefficientMap Class Reference

Detailed Description

Definition at line 33 of file sparse_coefficient_map.h.

#include <sparse_coefficient_map.h>

Public Member Functions

 SparseCoefficientMap ()=default
 SparseCoefficientMap (absl::flat_hash_map< VariableId, double > terms)
double get (VariableId id) const
bool set (VariableId id, double coeff)
const absl::flat_hash_map< VariableId, double > & terms () const
void clear ()
void erase (VariableId id)
SparseDoubleVectorProto Proto () const

Constructor & Destructor Documentation

◆ SparseCoefficientMap() [1/2]

operations_research::math_opt::SparseCoefficientMap::SparseCoefficientMap ( )
default

◆ SparseCoefficientMap() [2/2]

operations_research::math_opt::SparseCoefficientMap::SparseCoefficientMap ( absl::flat_hash_map< VariableId, double > terms)
inlineexplicit

Definition at line 67 of file sparse_coefficient_map.h.

Member Function Documentation

◆ clear()

void operations_research::math_opt::SparseCoefficientMap::clear ( )
inline

Definition at line 96 of file sparse_coefficient_map.h.

◆ erase()

void operations_research::math_opt::SparseCoefficientMap::erase ( VariableId id)
inline

Definition at line 98 of file sparse_coefficient_map.h.

◆ get()

double operations_research::math_opt::SparseCoefficientMap::get ( VariableId id) const
inline

Definition at line 73 of file sparse_coefficient_map.h.

◆ Proto()

SparseDoubleVectorProto operations_research::math_opt::SparseCoefficientMap::Proto ( ) const

Definition at line 24 of file sparse_coefficient_map.cc.

◆ set()

bool operations_research::math_opt::SparseCoefficientMap::set ( VariableId id,
double coeff )
inline

Definition at line 81 of file sparse_coefficient_map.h.

◆ terms()

const absl::flat_hash_map< VariableId, double > & operations_research::math_opt::SparseCoefficientMap::terms ( ) const
inline

Definition at line 46 of file sparse_coefficient_map.h.


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