CGCArray< T > Class Template Reference


Detailed Description

template<class T>
class CGCArray< T >

Template class GCArray implements a garbage collecting static array.

This array is meant to be used for Shogun Objects (CSGObject) only, as it deals with garbage collection, i.e. on read and array assignment the reference count is increased (and decreased on delete and overwriting elements).

Definition at line 24 of file GCArray.h.

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

List of all members.

Public Member Functions

 CGCArray (int32_t sz)
virtual ~CGCArray ()
void set (T element, int32_t index)
get (int32_t index)
virtual const char * get_name () const

Protected Attributes

T * array
 array
int32_t size
 size of array

Constructor & Destructor Documentation

template<class T >
CGCArray< T >::CGCArray ( int32_t  sz  ) 

Constructor

Parameters:
sz length of array

Definition at line 31 of file GCArray.h.

template<class T >
virtual CGCArray< T >::~CGCArray (  )  [virtual]

Destructor

Definition at line 39 of file GCArray.h.


Member Function Documentation

template<class T >
T CGCArray< T >::get ( int32_t  index  ) 

read only access operator

Parameters:
index index to write to
Returns:
element element

Definition at line 65 of file GCArray.h.

template<class T >
virtual const char* CGCArray< T >::get_name (  )  const [virtual]

get the name of the object

Returns:
name of object

Implements CSGObject.

Definition at line 78 of file GCArray.h.

template<class T >
void CGCArray< T >::set ( element,
int32_t  index 
)

write access operator

Parameters:
element - element to write
index - index to write to

Definition at line 51 of file GCArray.h.


Member Data Documentation

template<class T >
T* CGCArray< T >::array [protected]

array

Definition at line 82 of file GCArray.h.

template<class T >
int32_t CGCArray< T >::size [protected]

size of array

Definition at line 84 of file GCArray.h.


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

SHOGUN Machine Learning Toolbox - Documentation