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 ~SGSparseMatrix | ( | ) | [virtual] |
destructor
Definition at line 62 of file SGSparseMatrix.h.
virtual void copy_data | ( | const SGReferencedData & | orig | ) | [protected, virtual] |
void copy_refcount | ( | const SGReferencedData & | orig | ) | [protected, inherited] |
copy refcount
Definition at line 102 of file SGReferencedData.h.
virtual void free_data | ( | ) | [protected, virtual] |
virtual void init_data | ( | ) | [protected, virtual] |
SGSparseVector<T>& operator[] | ( | index_t | index | ) |
index access operator
Definition at line 74 of file SGSparseMatrix.h.
const SGSparseVector<T>& operator[] | ( | index_t | index | ) | const |
index access operator
Definition at line 68 of file SGSparseMatrix.h.
int32_t ref | ( | ) | [protected, inherited] |
increase reference counter
Definition at line 111 of file SGReferencedData.h.
int32_t ref_count | ( | ) | [inherited] |
int32_t unref | ( | ) | [protected, inherited] |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
Definition at line 136 of file SGReferencedData.h.
total number of features
Definition at line 114 of file SGSparseMatrix.h.
total number of vectors
Definition at line 111 of file SGSparseMatrix.h.
array of sparse vectors of size num_vectors
Definition at line 117 of file SGSparseMatrix.h.