SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes
Block< Matrix > Struct Template Reference

Detailed Description

template<class Matrix>
struct shogun::linalg::Block< Matrix >

Generic class Block which wraps a matrix class and contains block specific information, providing a uniform way to deal with matrix blocks for all supported backend matrices.

Definition at line 49 of file Block.h.

Public Types

typedef Matrix::Scalar Scalar

Public Member Functions

 Block (Matrix matrix, index_t row_begin, index_t col_begin, index_t row_size, index_t col_size)

Public Attributes

Matrix m_matrix
index_t m_row_begin
index_t m_col_begin
index_t m_row_size
index_t m_col_size

Member Typedef Documentation

typedef Matrix::Scalar Scalar

Definition at line 51 of file Block.h.

Constructor & Destructor Documentation

Block ( Matrix  matrix,
index_t  row_begin,
index_t  col_begin,
index_t  row_size,
index_t  col_size 
)

constructor

Parameters
matrixthe matrix on which the block is defined
row_beginthe row index at which the block starts
col_beginthe col index at which the block starts
row_sizethe number of rows in the block
col_sizethe number of cols in the block

For example, row_begin 0, col_begin 4 and row_size 5, col_size 6 represents the block that starts at index (0,4) in the matrix and goes upto (0+5-1,4+6-1) i.e. (4,9) both inclusive

Definition at line 66 of file Block.h.

Member Data Documentation

index_t m_col_begin

the col index at which the block starts

Definition at line 81 of file Block.h.

index_t m_col_size

the number of cols in the block

Definition at line 87 of file Block.h.

Matrix m_matrix

the matrix on which the block is defined

Definition at line 75 of file Block.h.

index_t m_row_begin

the row index at which the block starts

Definition at line 78 of file Block.h.

index_t m_row_size

the number of rows in the block

Definition at line 84 of file Block.h.


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

SHOGUN Machine Learning Toolbox - Documentation