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

Detailed Description

template<class T>
class shogun::SGMatrix< T >

shogun matrix

default constructor constructor for setting params constructor to create new vector in memory free vector destroy vector idx cache

Definition at line 300 of file DataType.h.

Public Member Functions

 SGMatrix ()
 SGMatrix (T *m, index_t nrows, index_t ncols, bool free_mat=false)
 SGMatrix (index_t nrows, index_t ncols, bool free_mat=false)
 SGMatrix (const SGMatrix &orig)
virtual ~SGMatrix ()
virtual void free_matrix ()
virtual void destroy_matrix ()
const T & operator[] (index_t index) const
T & operator[] (index_t index)

Public Attributes

T * matrix
index_t num_rows
index_t num_cols
bool do_free

Constructor & Destructor Documentation

SGMatrix ( )

default constructor

Definition at line 304 of file DataType.h.

SGMatrix ( T *  m,
index_t  nrows,
index_t  ncols,
bool  free_mat = false 
)

constructor for setting params

Definition at line 307 of file DataType.h.

SGMatrix ( index_t  nrows,
index_t  ncols,
bool  free_mat = false 
)

constructor to create new matrix in memory

Definition at line 311 of file DataType.h.

SGMatrix ( const SGMatrix< T > &  orig)

copy constructor

Definition at line 318 of file DataType.h.

virtual ~SGMatrix ( )
virtual

empty destructor

Definition at line 323 of file DataType.h.

Member Function Documentation

virtual void destroy_matrix ( )
virtual

destroy matrix

Definition at line 340 of file DataType.h.

virtual void free_matrix ( )
virtual

free matrix

Definition at line 328 of file DataType.h.

const T& operator[] ( index_t  index) const

operator overload for matrix read only access

Parameters
indexto access

Definition at line 349 of file DataType.h.

T& operator[] ( index_t  index)

operator overload for matrix r/w access

Parameters
indexto access

Definition at line 357 of file DataType.h.

Member Data Documentation

bool do_free

whether matrix needs to be freed

Definition at line 370 of file DataType.h.

T* matrix

matrix

Definition at line 364 of file DataType.h.

index_t num_cols

number of columns of matrix

Definition at line 368 of file DataType.h.

index_t num_rows

number of rows of matrix

Definition at line 366 of file DataType.h.


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

SHOGUN Machine Learning Toolbox - Documentation