Classes | Public Member Functions | Public Attributes | List of all members
vnl_sparse_matrix_pair< T > Class Template Reference

Stores elements of sparse matrix. More...

#include <vnl_sparse_matrix.h>

Classes

struct  less
 

Public Member Functions

 vnl_sparse_matrix_pair ()
 Constructs a pair with null values. More...
 
 vnl_sparse_matrix_pair (unsigned int const &a, T const &b)
 Constructs a pair with position a and value b. More...
 
 vnl_sparse_matrix_pair (const vnl_sparse_matrix_pair< T > &o)
 
vnl_sparse_matrix_pair< T > & operator= (vnl_sparse_matrix_pair const &o)
 

Public Attributes

unsigned int first
 
second
 

Detailed Description

template<class T>
class vnl_sparse_matrix_pair< T >

Stores elements of sparse matrix.

Only those values which are non-zero are stored. The sparse matrix currently supports only getting/putting elements, and multiply by vector or another sparse matrix.

Each row is stored as a vector of std::pair<unsigned int,T>, where the first of the pair indicates the column index, and the second the value. All rows are stored, as std::vector< row >;

Definition at line 74 of file vnl_sparse_matrix.h.

Constructor & Destructor Documentation

◆ vnl_sparse_matrix_pair() [1/3]

template<class T>
vnl_sparse_matrix_pair< T >::vnl_sparse_matrix_pair ( )
inline

Constructs a pair with null values.

Definition at line 81 of file vnl_sparse_matrix.h.

◆ vnl_sparse_matrix_pair() [2/3]

template<class T>
vnl_sparse_matrix_pair< T >::vnl_sparse_matrix_pair ( unsigned int const &  a,
T const &  b 
)
inline

Constructs a pair with position a and value b.

Definition at line 84 of file vnl_sparse_matrix.h.

◆ vnl_sparse_matrix_pair() [3/3]

template<class T>
vnl_sparse_matrix_pair< T >::vnl_sparse_matrix_pair ( const vnl_sparse_matrix_pair< T > &  o)
inline

Definition at line 86 of file vnl_sparse_matrix.h.

Member Function Documentation

◆ operator=()

template<class T>
vnl_sparse_matrix_pair<T>& vnl_sparse_matrix_pair< T >::operator= ( vnl_sparse_matrix_pair< T > const &  o)
inline

Definition at line 88 of file vnl_sparse_matrix.h.

Member Data Documentation

◆ first

template<class T>
unsigned int vnl_sparse_matrix_pair< T >::first

Definition at line 77 of file vnl_sparse_matrix.h.

◆ second

template<class T>
T vnl_sparse_matrix_pair< T >::second

Definition at line 78 of file vnl_sparse_matrix.h.


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