template class SGSparseMatrix
在文件 base/Parameter.h 第 27 行定义.

Public 成员函数 | |
| SGSparseMatrix () | |
| SGSparseMatrix (SGSparseVector< T > *vecs, index_t num_feat, index_t num_vec, bool ref_counting=true) | |
| SGSparseMatrix (index_t num_feat, index_t num_vec, bool ref_counting=true) | |
| SGSparseMatrix (SGMatrix< T > dense) | |
| SGSparseMatrix (const SGSparseMatrix &orig) | |
| virtual | ~SGSparseMatrix () |
| const SGSparseVector< T > & | operator[] (index_t index) const |
| SGSparseVector< T > & | operator[] (index_t index) |
| SGSparseMatrix< T > | get () |
| const SGVector< T > | operator* (SGVector< T > v) const |
| template<class ST > | |
| const SGVector< T > | operator* (SGVector< ST > v) const |
| const T | operator() (index_t i_row, index_t i_col) const |
| T & | operator() (index_t i_row, index_t i_col) |
| void | load (CFile *loader) |
| SGVector< float64_t > | load_with_labels (CLibSVMFile *libsvm_file, bool do_sort_features=true) |
| void | save (CFile *saver) |
| void | save_with_labels (CLibSVMFile *saver, SGVector< float64_t > labels) |
| SGSparseMatrix< T > | get_transposed () |
| void | from_dense (SGMatrix< T > full) |
| void | sort_features () |
| template<> | |
| const SGVector< complex128_t > | operator* (SGVector< float64_t > v) const |
| template<> | |
| const SGVector< complex128_t > | operator* (SGVector< int32_t > v) const |
| template<> | |
| const SGVector< float64_t > | operator* (SGVector< int32_t > v) const |
| template<> | |
| void | load (CFile *loader) |
| template<> | |
| SGVector< float64_t > | load_with_labels (CLibSVMFile *file, bool do_sort_features) |
| template<> | |
| void | save (CFile *saver) |
| template<> | |
| void | save_with_labels (CLibSVMFile *saver, SGVector< float64_t > labels) |
| int32_t | ref_count () |
Public 属性 | |
| 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 成员函数 | |
| 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
在文件 SGSparseMatrix.cpp 第 11 行定义.
| SGSparseMatrix | ( | SGSparseVector< T > * | vecs, |
| index_t | num_feat, | ||
| index_t | num_vec, | ||
| bool | ref_counting = true |
||
| ) |
constructor for setting params
在文件 SGSparseMatrix.cpp 第 17 行定义.
| SGSparseMatrix | ( | index_t | num_feat, |
| index_t | num_vec, | ||
| bool | ref_counting = true |
||
| ) |
constructor to create new matrix in memory
在文件 SGSparseMatrix.cpp 第 26 行定义.
| SGSparseMatrix | ( | SGMatrix< T > | dense | ) |
constructor to create new sparse matrix from a dense one
| dense | dense matrix to be converted |
在文件 SGSparseMatrix.cpp 第 34 行定义.
| SGSparseMatrix | ( | const SGSparseMatrix< T > & | orig | ) |
copy constructor
在文件 SGSparseMatrix.cpp 第 40 行定义.
|
virtual |
destructor
在文件 SGSparseMatrix.cpp 第 46 行定义.
|
protectedvirtual |
|
protectedinherited |
copy refcount
在文件 SGReferencedData.cpp 第 55 行定义.
|
protectedvirtual |
| void from_dense | ( | SGMatrix< T > | full | ) |
create a sparse matrix from a dense one
| full | the dense matrix to create the sparse one from |
在文件 SGSparseMatrix.cpp 第 232 行定义.
| SGSparseMatrix<T> get | ( | ) |
get the sparse matrix (no copying is done here)
在文件 SGSparseMatrix.h 第 75 行定义.
| SGSparseMatrix< T > get_transposed | ( | ) |
return the transposed of the sparse matrix
在文件 SGSparseMatrix.cpp 第 182 行定义.
|
protectedvirtual |
| void load | ( | CFile * | loader | ) |
在文件 SGSparseMatrix.cpp 第 102 行定义.
| void load | ( | CFile * | loader | ) |
load sparse matrix from file
| loader | File object via which to load data |
在文件 SGSparseMatrix.cpp 第 91 行定义.
| SGVector< float64_t > load_with_labels | ( | CLibSVMFile * | file, |
| bool | do_sort_features | ||
| ) |
在文件 SGSparseMatrix.cpp 第 123 行定义.
| SGVector< float64_t > load_with_labels | ( | CLibSVMFile * | libsvm_file, |
| bool | do_sort_features = true |
||
| ) |
load sparse matrix from libsvm file together with labels
| libsvm_file | the libsvm file |
| do_sort_features | whether to sort the vector indices (such that they are in ascending order) after loading |
在文件 SGSparseMatrix.cpp 第 107 行定义.
| const SGVector< complex128_t > operator* | ( | SGVector< float64_t > | v | ) | const |
在文件 SGSparseMatrix.cpp 第 52 行定义.
| const SGVector< complex128_t > operator* | ( | SGVector< int32_t > | v | ) | const |
在文件 SGSparseMatrix.cpp 第 65 行定义.
在文件 SGSparseMatrix.cpp 第 78 行定义.
compute sparse-matrix dense-vector multiplication
| v | the dense-vector to be multiplied with |
在文件 SGSparseMatrix.h 第 84 行定义.
compute sparse-matrix dense-vector multiplication
| v | the dense-vector to be multiplied with |
| const SGSparseVector<T>& operator[] | ( | index_t | index | ) | const |
index access operator
在文件 SGSparseMatrix.h 第 59 行定义.
| SGSparseVector<T>& operator[] | ( | index_t | index | ) |
index access operator
在文件 SGSparseMatrix.h 第 65 行定义.
|
protectedinherited |
|
inherited |
| void save | ( | CFile * | saver | ) |
在文件 SGSparseMatrix.cpp 第 137 行定义.
| void save | ( | CFile * | saver | ) |
save sparse matrix to file
| saver | File object via which to save data |
在文件 SGSparseMatrix.cpp 第 127 行定义.
| void save_with_labels | ( | CLibSVMFile * | saver, |
| SGVector< float64_t > | labels | ||
| ) |
在文件 SGSparseMatrix.cpp 第 155 行定义.
| void save_with_labels | ( | CLibSVMFile * | saver, |
| SGVector< float64_t > | labels | ||
| ) |
save sparse matrix together with labels to file
| saver | File object via which to save data |
| labels | label vector |
在文件 SGSparseMatrix.cpp 第 142 行定义.
| void sort_features | ( | ) |
sort the indices of the sparse matrix such that they are in ascending order
在文件 SGSparseMatrix.cpp 第 224 行定义.
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
在文件 SGReferencedData.cpp 第 84 行定义.
| index_t num_features |
total number of features
在文件 SGSparseMatrix.h 第 207 行定义.
| index_t num_vectors |
total number of vectors
在文件 SGSparseMatrix.h 第 204 行定义.
| SGSparseVector<T>* sparse_matrix |
array of sparse vectors of size num_vectors
在文件 SGSparseMatrix.h 第 210 行定义.