SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Types | Static Public Member Functions
elementwise_product< Backend::EIGEN3, Matrix > Struct Template Reference

Detailed Description

template<class Matrix>
struct shogun::linalg::implementation::elementwise_product< Backend::EIGEN3, Matrix >

Specialization of elementwise_product for the Eigen3 backend

Definition at line 69 of file ElementwiseProduct.h.

Public Types

typedef Matrix::Scalar T
 
typedef SGMatrix< TReturnType
 
typedef Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
MatrixXt
 

Static Public Member Functions

static ReturnType compute (SGMatrix< T > A, SGMatrix< T > B)
 
static void compute (SGMatrix< T > A, SGMatrix< T > B, SGMatrix< T > C)
 

Member Typedef Documentation

typedef Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> MatrixXt

Eigen3 matrix type

Definition at line 78 of file ElementwiseProduct.h.

typedef SGMatrix<T> ReturnType

Return type

Definition at line 75 of file ElementwiseProduct.h.

typedef Matrix::Scalar T

Scalar type

Definition at line 72 of file ElementwiseProduct.h.

Member Function Documentation

static ReturnType compute ( SGMatrix< T A,
SGMatrix< T B 
)
static

Performs the operation C = A .* B where ".*" denotes elementwise multiplication.

This version returns the result in a newly created matrix. If elementwise-product is desired that will work irrespective of the backend and the matrix type used, then this method should be used.

Parameters
AFirst matrix
BSecond matrix
Returns
The result of the operation

Definition at line 90 of file ElementwiseProduct.h.

static void compute ( SGMatrix< T A,
SGMatrix< T B,
SGMatrix< T C 
)
static

Performs the operation C = A .* B where ".*" denotes elementwise multiplication.

This version should be used for backend specific code requirements. For example, use this with CGPUMatrix and explicitly set ViennaCL backend, or SGMatrix and explicitly set Eigen3 backend. If matrix-type/backend-type independent code is desired, use the version that does not support preallocated result matrix but returns the result in a newly created matrix instead.

Parameters
AFirst matrix
BSecond matrix
CResult of the operation

Definition at line 117 of file ElementwiseProduct.h.


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

SHOGUN Machine Learning Toolbox - Documentation