SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
SGMatrix< T > Singleton Reference

Detailed Description

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

shogun matrix

Definition at line 26 of file base/Parameter.h.

Inheritance diagram for SGMatrix< T >:
[legend]

Public Types

typedef Eigen::Matrix< T,-1,-1, 0,-1,-1 > EigenMatrixXt
 
typedef Eigen::Map
< EigenMatrixXt,
0, Eigen::Stride< 0, 0 > > 
EigenMatrixXtMap
 
typedef T Scalar
 

Public Member Functions

 SGMatrix ()
 
 SGMatrix (bool ref_counting)
 
 SGMatrix (T *m, index_t nrows, index_t ncols, bool ref_counting=true)
 
 SGMatrix (T *m, index_t nrows, index_t ncols, index_t offset)
 
 SGMatrix (index_t nrows, index_t ncols, bool ref_counting=true)
 
 SGMatrix (SGVector< T > vec)
 
 SGMatrix (SGVector< T > vec, index_t nrows, index_t ncols)
 
 SGMatrix (EigenMatrixXt &mat)
 
 operator EigenMatrixXtMap () const
 
 SGMatrix (const SGMatrix &orig)
 
virtual ~SGMatrix ()
 
T * get_column_vector (index_t col) const
 
SGVector< T > get_row_vector (index_t row) const
 
SGVector< T > get_diagonal_vector () const
 
const T & operator() (index_t i_row, index_t i_col) const
 
const T & operator[] (index_t index) const
 
T & operator() (index_t i_row, index_t i_col)
 
T & operator[] (index_t index)
 
SGMatrix< T > get ()
 
T * data () const
 
uint64_t size () const
 
bool operator== (SGMatrix< T > &other)
 
bool equals (SGMatrix< T > &other)
 
void set_const (T const_elem)
 
void zero ()
 
bool is_symmetric ()
 
max_single ()
 
SGMatrix< T > clone ()
 
void compute_few_eigenvectors (double *matrix_, double *&eigenvalues, double *&eigenvectors, int n, int il, int iu)
 
void center ()
 
void remove_column_mean ()
 
void display_matrix (const char *name="matrix") const
 
void load (CFile *loader)
 
void save (CFile *saver)
 
template<>
void zero ()
 
template<>
bool is_symmetric ()
 
template<>
bool is_symmetric ()
 
template<>
bool is_symmetric ()
 
template<>
bool is_symmetric ()
 
template<>
complex128_t max_single ()
 
template<>
void display_matrix (const bool *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const char *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const int8_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const uint8_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const int16_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const uint16_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const int32_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const uint32_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const int64_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const uint64_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const float32_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const float64_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const floatmax_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
void display_matrix (const complex128_t *matrix, int32_t rows, int32_t cols, const char *name, const char *prefix)
 
template<>
SGMatrix< char > create_identity_matrix (index_t size, char scale)
 
template<>
SGMatrix< int8_t > create_identity_matrix (index_t size, int8_t scale)
 
template<>
SGMatrix< uint8_t > create_identity_matrix (index_t size, uint8_t scale)
 
template<>
SGMatrix< bool > create_identity_matrix (index_t size, bool scale)
 
template<>
SGMatrix< int16_t > create_identity_matrix (index_t size, int16_t scale)
 
template<>
SGMatrix< uint16_t > create_identity_matrix (index_t size, uint16_t scale)
 
template<>
SGMatrix< int32_t > create_identity_matrix (index_t size, int32_t scale)
 
template<>
SGMatrix< uint32_t > create_identity_matrix (index_t size, uint32_t scale)
 
template<>
SGMatrix< int64_t > create_identity_matrix (index_t size, int64_t scale)
 
template<>
SGMatrix< uint64_t > create_identity_matrix (index_t size, uint64_t scale)
 
template<>
SGMatrix< float32_tcreate_identity_matrix (index_t size, float32_t scale)
 
template<>
SGMatrix< float64_tcreate_identity_matrix (index_t size, float64_t scale)
 
template<>
SGMatrix< floatmax_tcreate_identity_matrix (index_t size, floatmax_t scale)
 
template<>
SGMatrix< complex128_tcreate_identity_matrix (index_t size, complex128_t scale)
 
template<>
void load (CFile *loader)
 
template<>
void save (CFile *saver)
 
int32_t ref_count ()
 

Static Public Member Functions

static T * clone_matrix (const T *matrix, int32_t nrows, int32_t ncols)
 
static void transpose_matrix (T *&matrix, int32_t &num_feat, int32_t &num_vec)
 
static void create_diagonal_matrix (T *matrix, T *v, int32_t size)
 
static SGMatrix< T > create_identity_matrix (index_t size, T scale)
 
static SGVector< float64_tcompute_eigenvectors (SGMatrix< float64_t > matrix)
 
static double * compute_eigenvectors (double *matrix, int n, int m)
 
static SGMatrix< float64_tmatrix_multiply (SGMatrix< float64_t > A, SGMatrix< float64_t > B, bool transpose_A=false, bool transpose_B=false, float64_t scale=1.0)
 
static void inverse (SGMatrix< float64_t > matrix)
 inverses square matrix in-place More...
 
static float64_tpinv (float64_t *matrix, int32_t rows, int32_t cols, float64_t *target=NULL)
 
static float64_t trace (float64_t *mat, int32_t cols, int32_t rows)
 
static T * get_row_sum (T *matrix, int32_t m, int32_t n)
 
static T * get_column_sum (T *matrix, int32_t m, int32_t n)
 
static void center_matrix (T *matrix, int32_t m, int32_t n)
 
static void display_matrix (const T *matrix, int32_t rows, int32_t cols, const char *name="matrix", const char *prefix="")
 
static void display_matrix (const SGMatrix< T > matrix, const char *name="matrix", const char *prefix="")
 
static SGMatrix< T > get_allocated_matrix (index_t num_rows, index_t num_cols, SGMatrix< T > pre_allocated=SGMatrix< T >())
 

Public Attributes

T * matrix
 
index_t num_rows
 
index_t num_cols
 

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

Member Typedef Documentation

typedef Eigen::Matrix<T,-1,-1,0,-1,-1> EigenMatrixXt

Definition at line 36 of file SGMatrix.h.

Definition at line 37 of file SGMatrix.h.

typedef T Scalar

The scalar type of the matrix

Definition at line 40 of file SGMatrix.h.

Constructor & Destructor Documentation

SGMatrix ( )

Default constructor

Definition at line 28 of file SGMatrix.cpp.

SGMatrix ( bool  ref_counting)

Constructor for setting reference counting while not creating the matrix in memory (use this for static SGMatrix instances)

Definition at line 34 of file SGMatrix.cpp.

SGMatrix ( T *  m,
index_t  nrows,
index_t  ncols,
bool  ref_counting = true 
)

Constructor for setting params

Definition at line 40 of file SGMatrix.cpp.

SGMatrix ( T *  m,
index_t  nrows,
index_t  ncols,
index_t  offset 
)

Wraps a matrix around an existing memory segment with an offset

Definition at line 53 of file SGMatrix.h.

SGMatrix ( index_t  nrows,
index_t  ncols,
bool  ref_counting = true 
)

Constructor to create new matrix in memory

Definition at line 45 of file SGMatrix.cpp.

SGMatrix ( SGVector< T >  vec)

Constructor for creating a SGMatrix from a SGVector with refcounting. We do not copy the data here, just the pointer to data and the ref- count object of the SGVector (i.e. vec and this share same data and ref-count object).

This constructor assumes that the vector is the column 0 in the matrix.

Parameters
vecThe SGVector

Definition at line 52 of file SGMatrix.cpp.

SGMatrix ( SGVector< T >  vec,
index_t  nrows,
index_t  ncols 
)

Constructor for creating a SGMatrix from a SGVector with refcounting. We do not copy the data here, just the pointer to data and the ref- count object of the SGVector (i.e. vec and this share same data and ref-count object).

The number of elements in the matrix MUST be same as the number of elements in the vector

Parameters
vecThe SGVector
nrowsnumber of rows in the matrix
ncolsnumber of columns in the matrix

Definition at line 61 of file SGMatrix.cpp.

SGMatrix ( EigenMatrixXt mat)

Wraps a matrix around the data of an Eigen3 matrix

Definition at line 82 of file SGMatrix.cpp.

SGMatrix ( const SGMatrix< T > &  orig)

Copy constructor

Definition at line 76 of file SGMatrix.cpp.

~SGMatrix ( )
virtual

Empty destructor

Definition at line 96 of file SGMatrix.cpp.

Member Function Documentation

void center ( )

Centers the matrix, i.e. removes column/row mean from columns/rows

Definition at line 342 of file SGMatrix.cpp.

void center_matrix ( T *  matrix,
int32_t  m,
int32_t  n 
)
static

Centers matrix (e.g. kernel matrix in feature space INPLACE

Definition at line 348 of file SGMatrix.cpp.

SGMatrix< T > clone ( )

Clone matrix

Definition at line 256 of file SGMatrix.cpp.

T * clone_matrix ( const T *  matrix,
int32_t  nrows,
int32_t  ncols 
)
static

Clone matrix

Definition at line 263 of file SGMatrix.cpp.

SGVector< float64_t > compute_eigenvectors ( SGMatrix< float64_t matrix)
static

Compute eigenvalues and eigenvectors of symmetric matrix using LAPACK

Parameters
matrixsymmetric matrix to compute eigenproblem. Is overwritten and contains orthonormal eigenvectors afterwards
Returns
eigenvalues vector with eigenvalues equal to number of rows in matrix

Definition at line 891 of file SGMatrix.cpp.

double * compute_eigenvectors ( double *  matrix,
int  n,
int  m 
)
static

Compute eigenvalues and eigenvectors of symmetric matrix

Parameters
matrixoverwritten and contains n orthonormal eigenvectors
n
m
Returns
eigenvalues (array of length n, to be deleted[])

Definition at line 908 of file SGMatrix.cpp.

void compute_few_eigenvectors ( double *  matrix_,
double *&  eigenvalues,
double *&  eigenvectors,
int  n,
int  il,
int  iu 
)

Compute few eigenpairs of a symmetric matrix using LAPACK DSYEVR method (Relatively Robust Representations). Has at least O(n^3/3) complexity

Parameters
matrix_symmetric matrix
eigenvaluescontains iu-il+1 eigenvalues in ascending order (to be free'd)
eigenvectorscontains iu-il+1 orthonormal eigenvectors of given matrix column-wise (to be free'd)
ndimension of matrix
illow index of requested eigenpairs (1<=il<=n)
iuhigh index of requested eigenpairs (1<=il<=iu<=n)

Definition at line 930 of file SGMatrix.cpp.

void copy_data ( const SGReferencedData orig)
protectedvirtual

overridden to copy data

Implements SGReferencedData.

Definition at line 1023 of file SGMatrix.cpp.

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

Definition at line 55 of file SGReferencedData.cpp.

void create_diagonal_matrix ( T *  matrix,
T *  v,
int32_t  size 
)
static

Create diagonal matrix

Definition at line 291 of file SGMatrix.cpp.

static SGMatrix<T> create_identity_matrix ( index_t  size,
scale 
)
static

Returns the identity matrix, scaled by a factor

Parameters
sizesize of square identity matrix
scale(optional) scaling factor
SGMatrix< char > create_identity_matrix ( index_t  size,
char  scale 
)

Definition at line 656 of file SGMatrix.cpp.

SGMatrix< int8_t > create_identity_matrix ( index_t  size,
int8_t  scale 
)

Definition at line 663 of file SGMatrix.cpp.

SGMatrix< uint8_t > create_identity_matrix ( index_t  size,
uint8_t  scale 
)

Definition at line 676 of file SGMatrix.cpp.

SGMatrix< bool > create_identity_matrix ( index_t  size,
bool  scale 
)

Definition at line 689 of file SGMatrix.cpp.

SGMatrix< int16_t > create_identity_matrix ( index_t  size,
int16_t  scale 
)

Definition at line 702 of file SGMatrix.cpp.

SGMatrix< uint16_t > create_identity_matrix ( index_t  size,
uint16_t  scale 
)

Definition at line 715 of file SGMatrix.cpp.

SGMatrix< int32_t > create_identity_matrix ( index_t  size,
int32_t  scale 
)

Definition at line 728 of file SGMatrix.cpp.

SGMatrix< uint32_t > create_identity_matrix ( index_t  size,
uint32_t  scale 
)

Definition at line 741 of file SGMatrix.cpp.

SGMatrix< int64_t > create_identity_matrix ( index_t  size,
int64_t  scale 
)

Definition at line 754 of file SGMatrix.cpp.

SGMatrix< uint64_t > create_identity_matrix ( index_t  size,
uint64_t  scale 
)

Definition at line 767 of file SGMatrix.cpp.

SGMatrix< float32_t > create_identity_matrix ( index_t  size,
float32_t  scale 
)

Definition at line 780 of file SGMatrix.cpp.

SGMatrix< float64_t > create_identity_matrix ( index_t  size,
float64_t  scale 
)

Definition at line 793 of file SGMatrix.cpp.

SGMatrix< floatmax_t > create_identity_matrix ( index_t  size,
floatmax_t  scale 
)

Definition at line 806 of file SGMatrix.cpp.

SGMatrix< complex128_t > create_identity_matrix ( index_t  size,
complex128_t  scale 
)

Definition at line 819 of file SGMatrix.cpp.

T* data ( ) const

The data

Definition at line 179 of file SGMatrix.h.

void display_matrix ( const char *  name = "matrix") const

Display matrix

Definition at line 390 of file SGMatrix.cpp.

static void display_matrix ( const T *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name = "matrix",
const char *  prefix = "" 
)
static

Display matrix (useful for debugging)

void display_matrix ( const SGMatrix< T >  matrix,
const char *  name = "matrix",
const char *  prefix = "" 
)
static

Display matrix

Definition at line 396 of file SGMatrix.cpp.

void display_matrix ( const bool *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 404 of file SGMatrix.cpp.

void display_matrix ( const char *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 422 of file SGMatrix.cpp.

void display_matrix ( const int8_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 440 of file SGMatrix.cpp.

void display_matrix ( const uint8_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 458 of file SGMatrix.cpp.

void display_matrix ( const int16_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 476 of file SGMatrix.cpp.

void display_matrix ( const uint16_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 494 of file SGMatrix.cpp.

void display_matrix ( const int32_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 513 of file SGMatrix.cpp.

void display_matrix ( const uint32_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 531 of file SGMatrix.cpp.

void display_matrix ( const int64_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 548 of file SGMatrix.cpp.

void display_matrix ( const uint64_t *  matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 566 of file SGMatrix.cpp.

void display_matrix ( const float32_t matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 584 of file SGMatrix.cpp.

void display_matrix ( const float64_t matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 602 of file SGMatrix.cpp.

void display_matrix ( const floatmax_t matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 620 of file SGMatrix.cpp.

void display_matrix ( const complex128_t matrix,
int32_t  rows,
int32_t  cols,
const char *  name,
const char *  prefix 
)

Definition at line 638 of file SGMatrix.cpp.

bool equals ( SGMatrix< T > &  other)

Operator overload for element-wise matrix comparison. Note that only numerical data is compared

Parameters
othermatrix to compare with
Returns
true iff all elements are equal

Definition at line 114 of file SGMatrix.cpp.

void free_data ( )
protectedvirtual

overridden to free data

Implements SGReferencedData.

Definition at line 1039 of file SGMatrix.cpp.

SGMatrix<T> get ( )

Get the matrix (no copying is done here)

Returns
the refcount increased matrix

Definition at line 173 of file SGMatrix.h.

SGMatrix< T > get_allocated_matrix ( index_t  num_rows,
index_t  num_cols,
SGMatrix< T >  pre_allocated = SGMatrix<T>() 
)
static

Simple helper method that returns a matrix with allocated memory for a given size. A pre_allocated one can optionally be specified in order to use that. Basically just for having dimension check encapsulated.

Parameters
num_rowsrows of returned matrix
num_colscolumns of returned matrix
pre_allocatedoptional matrix that is returned instead of new matrix. Make sure dimensions match
Returns
matrix with allocated memory of specified size

Definition at line 993 of file SGMatrix.cpp.

T * get_column_sum ( T *  matrix,
int32_t  m,
int32_t  n 
)
static

Sums up all columns of a matrix and returns the resulting columnvector

Definition at line 329 of file SGMatrix.cpp.

T* get_column_vector ( index_t  col) const

Get a column vector

Parameters
colcolumn index
Returns
the column vector for index col

Definition at line 113 of file SGMatrix.h.

SGVector< T > get_diagonal_vector ( ) const

Get a main diagonal vector. Matrix is not required to be square.

Returns
main diagonal vector

Definition at line 1095 of file SGMatrix.cpp.

T * get_row_sum ( T *  matrix,
int32_t  m,
int32_t  n 
)
static

Sums up all rows of a matrix and returns the resulting rowvector

Definition at line 316 of file SGMatrix.cpp.

SGVector< T > get_row_vector ( index_t  row) const

Get a row vector

Parameters
rowrow index
Returns
row vector

Definition at line 1084 of file SGMatrix.cpp.

void init_data ( )
protectedvirtual

overridden to initialize empty data

Implements SGReferencedData.

Definition at line 1031 of file SGMatrix.cpp.

void inverse ( SGMatrix< float64_t matrix)
static

inverses square matrix in-place

Inverses square matrix in-place

Definition at line 881 of file SGMatrix.cpp.

bool is_symmetric ( )

Definition at line 166 of file SGMatrix.cpp.

bool is_symmetric ( )

Definition at line 183 of file SGMatrix.cpp.

bool is_symmetric ( )

Definition at line 200 of file SGMatrix.cpp.

bool is_symmetric ( )

Checks whether the matrix is symmetric or not. The equality check is performed using '==' operators for discrete types (int, char, bool) and using CMath::fequals method for floating types (float, double, long double, std::complex<double>) with default espilon values from std::numeric_limits

Returns
whether the matrix is symmetric

Definition at line 150 of file SGMatrix.cpp.

bool is_symmetric ( )

Definition at line 217 of file SGMatrix.cpp.

void load ( CFile loader)

Load matrix from file

Parameters
loaderFile object via which to load data

Definition at line 1048 of file SGMatrix.cpp.

void load ( CFile loader)

Definition at line 1063 of file SGMatrix.cpp.

SGMatrix< float64_t > matrix_multiply ( SGMatrix< float64_t A,
SGMatrix< float64_t B,
bool  transpose_A = false,
bool  transpose_B = false,
float64_t  scale = 1.0 
)
static

Computes scale* A*B, where A and B may be transposed. Asserts for matching inner dimensions.

Parameters
Amatrix A
transpose_Aoptional whether A should be transposed before
Bmatrix B
transpose_Boptional whether B should be transposed before
scaleoptional scaling factor for result

Definition at line 943 of file SGMatrix.cpp.

T max_single ( )
Returns
the maximum single element of the matrix

Definition at line 236 of file SGMatrix.cpp.

complex128_t max_single ( )

Definition at line 249 of file SGMatrix.cpp.

operator EigenMatrixXtMap ( ) const

Wraps an Eigen3 matrix around the data of this matrix

Definition at line 90 of file SGMatrix.cpp.

const T& operator() ( index_t  i_row,
index_t  i_col 
) const

Operator overload for matrix read only access

Parameters
i_row
i_col

Definition at line 136 of file SGMatrix.h.

T& operator() ( index_t  i_row,
index_t  i_col 
)

Operator overload for matrix r/w access

Parameters
i_row
i_col

Definition at line 154 of file SGMatrix.h.

bool operator== ( SGMatrix< T > &  other)

Check for pointer identity

Definition at line 102 of file SGMatrix.cpp.

const T& operator[] ( index_t  index) const

Operator overload for matrix read only access

Parameters
indexto access

Definition at line 145 of file SGMatrix.h.

T& operator[] ( index_t  index)

Operator overload for matrix r/w access

Parameters
indexto access

Definition at line 163 of file SGMatrix.h.

float64_t * pinv ( float64_t matrix,
int32_t  rows,
int32_t  cols,
float64_t target = NULL 
)
static

Return the pseudo inverse for matrix when matrix has shape (rows, cols) the pseudo inverse has (cols, rows)

Definition at line 842 of file SGMatrix.cpp.

int32_t ref ( )
protectedinherited

increase reference counter

Returns
reference count

Definition at line 64 of file SGReferencedData.cpp.

int32_t ref_count ( )
inherited

display reference counter

Returns
reference count

Definition at line 41 of file SGReferencedData.cpp.

void remove_column_mean ( )

Remove column mean

Definition at line 373 of file SGMatrix.cpp.

void save ( CFile saver)

Save matrix to file

Parameters
saverFile object via which to save data

Definition at line 1069 of file SGMatrix.cpp.

void save ( CFile saver)

Definition at line 1078 of file SGMatrix.cpp.

void set_const ( const_elem)

Set matrix to a constant

Definition at line 129 of file SGMatrix.cpp.

uint64_t size ( ) const

The size

Definition at line 185 of file SGMatrix.h.

float64_t trace ( float64_t mat,
int32_t  cols,
int32_t  rows 
)
static

Compute trace

Definition at line 306 of file SGMatrix.cpp.

void transpose_matrix ( T *&  matrix,
int32_t &  num_feat,
int32_t &  num_vec 
)
static

Transpose matrix

Definition at line 273 of file SGMatrix.cpp.

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 84 of file SGReferencedData.cpp.

void zero ( )

Definition at line 143 of file SGMatrix.cpp.

void zero ( )

fill matrix with zeros

Definition at line 136 of file SGMatrix.cpp.

Member Data Documentation

T* matrix

matrix

Definition at line 372 of file SGMatrix.h.

index_t num_cols

number of columns of matrix

Definition at line 376 of file SGMatrix.h.

index_t num_rows

number of rows of matrix

Definition at line 374 of file SGMatrix.h.


The documentation for this singleton was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation