SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions
SGSparseVector< T > Class Template Reference

Detailed Description

template<class T>
class shogun::SGSparseVector< T >

template class SGSparseVector

Definition at line 35 of file SGSparseVector.h.

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

Public Member Functions

 SGSparseVector ()
 SGSparseVector (SGSparseVectorEntry< T > *feats, index_t num_entries, bool ref_counting=true)
 SGSparseVector (index_t num_entries, bool ref_counting=true)
 SGSparseVector (const SGSparseVector &orig)
virtual ~SGSparseVector ()
int32_t ref_count ()

Public Attributes

index_t num_feat_entries
SGSparseVectorEntry< T > * features

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

default constructor

Definition at line 39 of file SGSparseVector.h.

SGSparseVector ( SGSparseVectorEntry< T > *  feats,
index_t  num_entries,
bool  ref_counting = true 
)

constructor for setting params

Definition at line 45 of file SGSparseVector.h.

SGSparseVector ( index_t  num_entries,
bool  ref_counting = true 
)

constructor to create new vector in memory

Definition at line 53 of file SGSparseVector.h.

SGSparseVector ( const SGSparseVector< T > &  orig)

copy constructor

Definition at line 61 of file SGSparseVector.h.

virtual ~SGSparseVector ( )
virtual

Definition at line 67 of file SGSparseVector.h.

Member Function Documentation

virtual void copy_data ( const SGReferencedData orig)
protectedvirtual

needs to be overridden to copy data

Implements SGReferencedData.

Definition at line 74 of file SGSparseVector.h.

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

Definition at line 102 of file SGReferencedData.h.

virtual void free_data ( )
protectedvirtual

needs to be overridden to free data

Implements SGReferencedData.

Definition at line 86 of file SGSparseVector.h.

virtual void init_data ( )
protectedvirtual

needs to be overridden to initialize empty data

Implements SGReferencedData.

Definition at line 80 of file SGSparseVector.h.

int32_t ref ( )
protectedinherited

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

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

SGSparseVectorEntry<T>* features

features

Definition at line 97 of file SGSparseVector.h.

index_t num_feat_entries

number of feature entries

Definition at line 94 of file SGSparseVector.h.


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

SHOGUN Machine Learning Toolbox - Documentation