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

#include <sparse_vector.h>

Public Attributes

std::vector< int64_t > ids
 Should be sorted (in increasing order) with all elements distinct.
 
std::vector< T > values
 Must have equal length to ids.
 

Detailed Description

template<typename T>
struct operations_research::math_opt::SparseVector< T >

A sparse representation of a vector of values.

This is equivalent to Sparse(DoubleBoolInt32)VectorProto but for C++.

Definition at line 26 of file sparse_vector.h.

Member Data Documentation

◆ ids

template<typename T >
std::vector<int64_t> operations_research::math_opt::SparseVector< T >::ids

Should be sorted (in increasing order) with all elements distinct.

Definition at line 28 of file sparse_vector.h.

◆ values

template<typename T >
std::vector<T> operations_research::math_opt::SparseVector< T >::values

Must have equal length to ids.

Definition at line 31 of file sparse_vector.h.


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