Feellgood
Public Member Functions | Public Attributes | List of all members
algebra::r_sparseMat::SparseVector Struct Reference

Public Member Functions

double & operator[] (int j)
 

Public Attributes

std::mutex mutex
 
std::vector< int > indices
 
std::vector< double > values
 

Detailed Description

Read-mode sparse vector.

This holds a mutex that protects the data during calls to add(), a list of indices, and a list of matching values. The following invariants should be enforced:

Since mutexes are not movable, neither is this class.

Member Function Documentation

◆ operator[]()

double& algebra::r_sparseMat::SparseVector::operator[] ( int  j)
inline

Return a reference to the coefficient at index j, which must be a valid index.

Member Data Documentation

◆ indices

std::vector<int> algebra::r_sparseMat::SparseVector::indices

array of vector indices.

◆ mutex

std::mutex algebra::r_sparseMat::SparseVector::mutex

mutex guarding the values during calls to add()

◆ values

std::vector<double> algebra::r_sparseMat::SparseVector::values

array of vector values matching the indices


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