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

Detailed Description

template<enum Backend, class Matrix>
struct shogun::linalg::implementation::colwise_sum< Backend, Matrix >

Generic class colwise_sum which provides a static compute method. This class is specialized for different types of matrices and backend, providing a mean to deal with various matrices directly without having to convert.

Definition at line 131 of file Sum.h.

Public Types

typedef Matrix::Scalar T

Static Public Member Functions

static SGVector< Tcompute (Matrix m, bool no_diag)
static SGVector< Tcompute (Block< Matrix > b, bool no_diag)
static void compute (SGMatrix< T > m, SGVector< T > result, bool no_diag)
static void compute (Block< SGMatrix< T > > b, SGVector< T > result, bool no_diag)

Member Typedef Documentation

typedef Matrix::Scalar T

Scalar type

Definition at line 134 of file Sum.h.

Member Function Documentation

static SGVector<T> compute ( Matrix  m,
bool  no_diag 
)
static

Method that computes column wise sum of co-efficients of a dense matrix

Parameters
mthe matrix whose colwise sum of co-efficients has to be computed
no_diagif true, diagonal entries are excluded from the sum
Returns
the colwise sum of co-efficients computed as \(s_j=\sum_{i}m_{i,j}\)
static SGVector<T> compute ( Block< Matrix >  b,
bool  no_diag 
)
static

Method that computes column wise sum of co-efficients of dense matrix blocks

Parameters
bthe matrix-block whose colwise sum of co-efficients has to be computed
no_diagif true, diagonal entries are excluded from the sum
Returns
the colwise sum of co-efficients computed as \(s_j=\sum_{i}b_{i,j}\)
static void compute ( SGMatrix< T m,
SGVector< T result,
bool  no_diag 
)
static

Method that computes the column wise sum of co-efficients of SGMatrix using Eigen3

Parameters
mthe matrix whose colwise sum of co-efficients has to be computed
no_diagif true, diagonal entries are excluded from the sum
resultPre-allocated vector for the result of the computation
static void compute ( Block< SGMatrix< T > >  b,
SGVector< T result,
bool  no_diag 
)
static

Method that computes the column wise sum of co-efficients of SGMatrix blocks using Eigen3

Parameters
bthe matrix-block whose colwise sum of co-efficients has to be computed
no_diagif true, diagonal entries are excluded from the sum
resultPre-allocated vector for the result of the computation

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

SHOGUN Machine Learning Toolbox - Documentation