OR-Tools  9.6
SparseCoefficientMap

Detailed Description

Definition at line 33 of file sparse_coefficient_map.h.

Public Member Functions

 SparseCoefficientMap ()=default
 
 SparseCoefficientMap (absl::flat_hash_map< VariableId, double > terms)
 
double get (const VariableId id) const
 
bool set (const VariableId id, const 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]

SparseCoefficientMap ( )
default

◆ SparseCoefficientMap() [2/2]

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

Definition at line 65 of file sparse_coefficient_map.h.

Member Function Documentation

◆ clear()

void clear ( )
inline

Definition at line 94 of file sparse_coefficient_map.h.

◆ erase()

void erase ( VariableId  id)
inline

Definition at line 96 of file sparse_coefficient_map.h.

◆ get()

double get ( const VariableId  id) const
inline

Definition at line 71 of file sparse_coefficient_map.h.

◆ Proto()

SparseDoubleVectorProto Proto ( ) const

Definition at line 24 of file sparse_coefficient_map.cc.

◆ set()

bool set ( const VariableId  id,
const double  coeff 
)
inline

Definition at line 79 of file sparse_coefficient_map.h.

◆ terms()

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

Definition at line 46 of file sparse_coefficient_map.h.


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