SHOGUN  6.0.0
rowwise_sum< backend, Matrix > Struct Template Reference

## Detailed Description

### template<Backend backend, class Matrix> struct shogun::linalg::implementation::rowwise_sum< backend, Matrix >

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

Definition at line 178 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 181 of file Sum.h.

## Member Function Documentation

 static SGVector compute ( Matrix m, bool no_diag )
static

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

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

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

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

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

Parameters
 m the matrix whose rowwise sum of co-efficients has to be computed no_diag if true, diagonal entries are excluded from the sum result Pre-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
 b the matrix-block whose rowwise sum of co-efficients has to be computed no_diag if true, diagonal entries are excluded from the sum result Pre-allocated vector for the result of the computation

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

SHOGUN Machine Learning Toolbox - Documentation