Public Member Functions | Public Attributes | Protected Member Functions

SGSparseMatrix< T > Class Template Reference


Detailed Description

template<class T>
class shogun::SGSparseMatrix< T >

template class SGSparseMatrix

Definition at line 24 of file SGSparseMatrix.h.

Inheritance diagram for SGSparseMatrix< T >:
Inheritance graph
[legend]

List of all members.

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 ()

Constructor & Destructor Documentation

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.


Member Function Documentation

virtual void copy_data ( const SGReferencedData orig  )  [protected, virtual]

copy data

Implements SGReferencedData.

Definition at line 82 of file SGSparseMatrix.h.

void copy_refcount ( const SGReferencedData orig  )  [protected, inherited]

copy refcount

Definition at line 102 of file SGReferencedData.h.

virtual void free_data (  )  [protected, virtual]

free data

Implements SGReferencedData.

Definition at line 98 of file SGSparseMatrix.h.

virtual void init_data (  )  [protected, virtual]

init data

Implements SGReferencedData.

Definition at line 90 of file SGSparseMatrix.h.

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

Returns:
reference count

Definition at line 111 of file SGReferencedData.h.

int32_t ref_count (  )  [inherited]

display reference counter

Returns:
reference count

Definition at line 81 of file SGReferencedData.h.

int32_t unref (  )  [protected, inherited]

decrement reference counter and deallocate object if refcount is zero before or after decrementing it

Returns:
reference count

Definition at line 136 of file SGReferencedData.h.


Member Data Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation