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

Detailed Description

template<class T>
class shogun::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 28 of file GCArray.h.

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

Public Member Functions

 CGCArray ()
 CGCArray (int32_t sz)
virtual ~CGCArray ()
void set (T element, int32_t index)
get (int32_t index)
virtual const char * get_name () const
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Protected Attributes

T * array
 array
int32_t size
 size of array

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

CGCArray ( )

default constructor

Definition at line 32 of file GCArray.h.

CGCArray ( int32_t  sz)

Constructor

Parameters
szlength of array

Definition at line 44 of file GCArray.h.

virtual ~CGCArray ( )
virtual

Destructor

Definition at line 52 of file GCArray.h.

Member Function Documentation

T get ( int32_t  index)

read only access operator

Parameters
indexindex to write to
Returns
element element

Definition at line 78 of file GCArray.h.

virtual const char* get_name ( ) const
virtual

get the name of the object

Returns
name of object

Implements CSGObject.

Definition at line 91 of file GCArray.h.

void set ( element,
int32_t  index 
)

write access operator

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

Definition at line 64 of file GCArray.h.

Member Data Documentation

T* array
protected

array

Definition at line 95 of file GCArray.h.

int32_t size
protected

size of array

Definition at line 97 of file GCArray.h.


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

SHOGUN Machine Learning Toolbox - Documentation