|
SHOGUN
v2.0.0
|
template class SGSparseMatrix
Definition at line 24 of file SGSparseMatrix.h.

Public Member Functions | |
| SGSparseMatrix () | |
| SGSparseMatrix (SGSparseVector< T > *vecs, index_t num_feat, index_t num_vec, bool ref_counting=true) | |
| SGSparseMatrix (index_t num_vec, index_t num_feat, bool ref_counting=true) | |
| SGSparseMatrix (const SGSparseMatrix &orig) | |
| virtual | ~SGSparseMatrix () |
| const SGSparseVector< T > & | operator[] (index_t index) const |
| SGSparseVector< T > & | operator[] (index_t index) |
| int32_t | ref_count () |
Public Attributes | |
| index_t | num_vectors |
| total number of vectors | |
| index_t | num_features |
| total number of features | |
| SGSparseVector< T > * | sparse_matrix |
| array of sparse vectors of size num_vectors | |
Protected Member Functions | |
| virtual void | copy_data (const SGReferencedData &orig) |
| virtual void | init_data () |
| virtual void | free_data () |
| void | copy_refcount (const SGReferencedData &orig) |
| int32_t | ref () |
| int32_t | unref () |
| SGSparseMatrix | ( | ) |
default constructor
Definition at line 28 of file SGSparseMatrix.h.
| SGSparseMatrix | ( | SGSparseVector< T > * | vecs, |
| index_t | num_feat, | ||
| index_t | num_vec, | ||
| bool | ref_counting = true |
||
| ) |
constructor for setting params
Definition at line 34 of file SGSparseMatrix.h.
| SGSparseMatrix | ( | index_t | num_vec, |
| index_t | num_feat, | ||
| bool | ref_counting = true |
||
| ) |
constructor to create new matrix in memory
Definition at line 43 of file SGSparseMatrix.h.
| SGSparseMatrix | ( | const SGSparseMatrix< T > & | orig | ) |
copy constructor
Definition at line 56 of file SGSparseMatrix.h.
|
virtual |
destructor
Definition at line 62 of file SGSparseMatrix.h.
|
protectedvirtual |
|
protectedinherited |
copy refcount
Definition at line 102 of file SGReferencedData.h.
|
protectedvirtual |
|
protectedvirtual |
| const SGSparseVector<T>& operator[] | ( | index_t | index | ) | const |
index access operator
Definition at line 68 of file SGSparseMatrix.h.
| SGSparseVector<T>& operator[] | ( | index_t | index | ) |
index access operator
Definition at line 74 of file SGSparseMatrix.h.
|
protectedinherited |
increase reference counter
Definition at line 111 of file SGReferencedData.h.
|
inherited |
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
Definition at line 136 of file SGReferencedData.h.
| index_t num_features |
total number of features
Definition at line 114 of file SGSparseMatrix.h.
| index_t num_vectors |
total number of vectors
Definition at line 111 of file SGSparseMatrix.h.
| SGSparseVector<T>* sparse_matrix |
array of sparse vectors of size num_vectors
Definition at line 117 of file SGSparseMatrix.h.