SHOGUN  6.1.3
Classes | Macros
LinalgBackendEigen.h File Reference

Go to the source code of this file.

Classes

class  LinalgBackendEigen
 Linalg methods with Eigen3 backend. More...
 

Macros

#define BACKEND_GENERIC_IN_PLACE_ADD(Type, Container)
 
#define BACKEND_GENERIC_ADD_COL_VEC(Type, Container)
 
#define BACKEND_GENERIC_ADD(Type, Container)
 
#define BACKEND_GENERIC_ADD_SCALAR(Type, Container)   virtual void add_scalar(Container<Type>& a, Type b) const;
 
#define BACKEND_GENERIC_CENTER_MATRIX(Type, Container)   virtual void center_matrix(Container<Type>& A) const;
 
#define BACKEND_GENERIC_CHOLESKY_FACTOR(Type, Container)
 
#define BACKEND_GENERIC_CHOLESKY_SOLVER(Type, Container)
 
#define BACKEND_GENERIC_CROSS_ENTROPY(Type, Container)
 
#define BACKEND_GENERIC_DOT(Type, Container)   virtual Type dot(const Container<Type>& a, const Container<Type>& b) const;
 
#define BACKEND_GENERIC_EIGEN_SOLVER(Type, Container)
 
#define BACKEND_GENERIC_EIGEN_SOLVER_SYMMETRIC(Type, Container)
 
#define BACKEND_GENERIC_IN_PLACE_ELEMENT_PROD(Type, Container)
 
#define BACKEND_GENERIC_IN_PLACE_BLOCK_ELEMENT_PROD(Type, Container)
 
#define BACKEND_GENERIC_EXPONENT(Type, Container)
 
#define BACKEND_GENERIC_IDENTITY(Type, Container)   virtual void identity(Container<Type>& identity_matrix) const;
 
#define BACKEND_GENERIC_LOGISTIC(Type, Container)   virtual void logistic(Container<Type>& a, Container<Type>& result) const;
 
#define BACKEND_GENERIC_IN_PLACE_MATRIX_PROD(Type, Container)
 
#define BACKEND_GENERIC_MAX(Type, Container)   virtual Type max(const Container<Type>& a) const;
 
#define BACKEND_GENERIC_REAL_MEAN(Type, Container)   virtual float64_t mean(const Container<Type>& a) const;
 
#define BACKEND_GENERIC_COMPLEX_MEAN(Container)   virtual complex128_t mean(const Container<complex128_t>& a) const;
 
#define BACKEND_GENERIC_MULTIPLY_BY_LOGISTIC_DERIV(Type, Container)
 
#define BACKEND_GENERIC_MULTIPLY_BY_RECTIFIED_LINEAR_DERIV(Type, Container)
 
#define BACKEND_GENERIC_QR_SOLVER(Type, Container)
 
#define BACKEND_GENERIC_RANGE_FILL(Type, Container)   virtual void range_fill(Container<Type>& a, const Type start) const;
 
#define BACKEND_GENERIC_RECTIFIED_LINEAR(Type, Container)
 
#define BACKEND_GENERIC_IN_PLACE_SCALE(Type, Container)
 
#define BACKEND_GENERIC_SET_CONST(Type, Container)   virtual void set_const(Container<Type>& a, const Type value) const;
 
#define BACKEND_GENERIC_SOFTMAX(Type, Container)   virtual void softmax(Container<Type>& a) const;
 
#define BACKEND_GENERIC_SQUARED_ERROR(Type, Container)
 
#define BACKEND_GENERIC_SUM(Type, Container)   virtual Type sum(const Container<Type>& a, bool no_diag) const;
 
#define BACKEND_GENERIC_BLOCK_SUM(Type, Container)
 
#define BACKEND_GENERIC_SYMMETRIC_SUM(Type, Container)   virtual Type sum_symmetric(const Container<Type>& a, bool no_diag) const;
 
#define BACKEND_GENERIC_SYMMETRIC_BLOCK_SUM(Type, Container)
 
#define BACKEND_GENERIC_COLWISE_SUM(Type, Container)
 
#define BACKEND_GENERIC_BLOCK_COLWISE_SUM(Type, Container)
 
#define BACKEND_GENERIC_ROWWISE_SUM(Type, Container)
 
#define BACKEND_GENERIC_BLOCK_ROWWISE_SUM(Type, Container)
 
#define BACKEND_GENERIC_SVD(Type, Container)
 
#define BACKEND_GENERIC_TRACE(Type, Container)   virtual Type trace(const Container<Type>& A) const;
 
#define BACKEND_GENERIC_TRANSPOSE_MATRIX(Type, Container)   virtual Container<Type> transpose_matrix(const Container<Type>& A) const;
 
#define BACKEND_GENERIC_TRIANGULAR_SOLVER(Type, Container)
 
#define BACKEND_GENERIC_ZERO(Type, Container)   virtual void zero(Container<Type>& a) const;
 

Macro Definition Documentation

#define BACKEND_GENERIC_ADD (   Type,
  Container 
)
Value:
virtual void add_vector( \
const SGMatrix<Type>& A, const SGVector<Type>& b, \
SGMatrix<Type>& result, Type alpha, Type beta) const;
void add_vector(const SGMatrix< T > &A, const SGVector< T > &b, SGMatrix< T > &result, T alpha=1, T beta=1)

Implementation of

See also
LinalgBackendBase::add_vector

Definition at line 69 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_ADD_COL_VEC (   Type,
  Container 
)
Value:
virtual void add_col_vec( \
const SGMatrix<Type>& A, index_t i, const SGVector<Type>& b, \
Container<Type>& result, Type alpha, Type beta) const;
int32_t index_t
Definition: common.h:72
void add_col_vec(const SGMatrix< T > &A, index_t i, const SGVector< T > &b, SGMatrix< T > &result, T alpha=1, T beta=1)

Implementation of

See also
LinalgBackendBase::add_col_vec

Definition at line 60 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_ADD_SCALAR (   Type,
  Container 
)    virtual void add_scalar(Container<Type>& a, Type b) const;

Implementation of

See also
LinalgBackendBase::add_scalar

Definition at line 77 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_BLOCK_COLWISE_SUM (   Type,
  Container 
)
Value:
virtual SGVector<Type> colwise_sum( \
const linalg::Block<Container<Type>>& a, bool no_diag) const;
SGVector< T > colwise_sum(const SGMatrix< T > &mat, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::colwise_sum

Definition at line 304 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_BLOCK_ROWWISE_SUM (   Type,
  Container 
)
Value:
virtual SGVector<Type> rowwise_sum( \
const linalg::Block<Container<Type>>& a, bool no_diag) const;
SGVector< T > rowwise_sum(const SGMatrix< T > &mat, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::rowwise_sum

Definition at line 318 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_BLOCK_SUM (   Type,
  Container 
)
Value:
virtual Type sum(const linalg::Block<Container<Type>>& a, bool no_diag) \
const;
T sum(const Container< T > &a, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::sum

Definition at line 277 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_CENTER_MATRIX (   Type,
  Container 
)    virtual void center_matrix(Container<Type>& A) const;

Implementation of

See also
LinalgBackendBase::center_matrix

Definition at line 84 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_CHOLESKY_FACTOR (   Type,
  Container 
)
Value:
virtual Container<Type> cholesky_factor( \
const Container<Type>& A, const bool lower) const;
SGMatrix< T > cholesky_factor(const SGMatrix< T > &A, const bool lower=true)

Implementation of

See also
LinalgBackendBase::cholesky_factor

Definition at line 90 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_CHOLESKY_SOLVER (   Type,
  Container 
)
Value:
virtual SGVector<Type> cholesky_solver( \
const Container<Type>& L, const SGVector<Type>& b, const bool lower) \
const;
SGVector< T > cholesky_solver(const SGMatrix< T > &L, const SGVector< T > &b, const bool lower=true)

Implementation of

See also
LinalgBackendBase::cholesky_solver

Definition at line 97 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_COLWISE_SUM (   Type,
  Container 
)
Value:
virtual SGVector<Type> colwise_sum(const Container<Type>& a, bool no_diag) \
const;
SGVector< T > colwise_sum(const SGMatrix< T > &mat, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::colwise_sum

Definition at line 297 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_COMPLEX_MEAN (   Container)    virtual complex128_t mean(const Container<complex128_t>& a) const;
#define BACKEND_GENERIC_CROSS_ENTROPY (   Type,
  Container 
)
Value:
virtual Type cross_entropy( \
const Container<Type>& P, const Container<Type>& Q) const;
T cross_entropy(const SGMatrix< T > p, const SGMatrix< T > q)

Implementation of

See also
linalg::cross_entropy

Definition at line 105 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_DOT (   Type,
  Container 
)    virtual Type dot(const Container<Type>& a, const Container<Type>& b) const;
#define BACKEND_GENERIC_EIGEN_SOLVER (   Type,
  Container 
)
Value:
virtual void eigen_solver( \
const Container<Type>& A, SGVector<Type>& eigenvalues, \
SGMatrix<Type>& eigenvectors) const;
void eigen_solver(const SGMatrix< T > &A, SGVector< T > &eigenvalues, SGMatrix< T > &eigenvectors)
#define BACKEND_GENERIC_EIGEN_SOLVER_SYMMETRIC (   Type,
  Container 
)
Value:
virtual void eigen_solver_symmetric( \
const Container<Type>& A, SGVector<Type>& eigenvalues, \
SGMatrix<Type>& eigenvectors, index_t k) const;
int32_t index_t
Definition: common.h:72
void eigen_solver_symmetric(const SGMatrix< T > &A, SGVector< T > &eigenvalues, SGMatrix< T > &eigenvectors, index_t k=0)
#define BACKEND_GENERIC_EXPONENT (   Type,
  Container 
)
Value:
virtual void exponent(const Container<Type>& a, Container<Type>& result) \
const
Container< T > exponent(const Container< T > &a)
#define BACKEND_GENERIC_IDENTITY (   Type,
  Container 
)    virtual void identity(Container<Type>& identity_matrix) const;
#define BACKEND_GENERIC_IN_PLACE_ADD (   Type,
  Container 
)
Value:
virtual void add( \
Container<Type>& a, Container<Type>& b, Type alpha, Type beta, \
Container<Type>& result) const;
void add(SGVector< T > &a, SGVector< T > &b, SGVector< T > &result, T alpha=1, T beta=1)

Implementation of

See also
LinalgBackendBase::add

Definition at line 51 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_IN_PLACE_BLOCK_ELEMENT_PROD (   Type,
  Container 
)
Value:
virtual void element_prod( \
linalg::Block<Container<Type>>& a, linalg::Block<Container<Type>>& b, \
Container<Type>& result) const;
void element_prod(Block< SGMatrix< T >> &a, Block< SGMatrix< T >> &b, SGMatrix< T > &result)

Implementation of

See also
LinalgBackendBase::element_prod

Definition at line 144 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_IN_PLACE_ELEMENT_PROD (   Type,
  Container 
)
Value:
virtual void element_prod( \
Container<Type>& a, Container<Type>& b, Container<Type>& result) \
const;
void element_prod(Block< SGMatrix< T >> &a, Block< SGMatrix< T >> &b, SGMatrix< T > &result)

Implementation of

See also
LinalgBackendBase::element_prod

Definition at line 136 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_IN_PLACE_MATRIX_PROD (   Type,
  Container 
)
Value:
virtual void matrix_prod( \
SGMatrix<Type>& a, Container<Type>& b, Container<Type>& result, \
bool transpose_A, bool transpose_B) const;
void matrix_prod(SGMatrix< T > &A, SGVector< T > &b, SGVector< T > &result, bool transpose=false)
#define BACKEND_GENERIC_IN_PLACE_SCALE (   Type,
  Container 
)
Value:
virtual void scale( \
Container<Type>& a, Type alpha, Container<Type>& result) const;
void scale(SGVector< T > &a, SGVector< T > &result, T alpha=1)
#define BACKEND_GENERIC_LOGISTIC (   Type,
  Container 
)    virtual void logistic(Container<Type>& a, Container<Type>& result) const;
#define BACKEND_GENERIC_MAX (   Type,
  Container 
)    virtual Type max(const Container<Type>& a) const;
#define BACKEND_GENERIC_MULTIPLY_BY_LOGISTIC_DERIV (   Type,
  Container 
)
Value:
Container<Type>& a, Container<Type>& result) const;
void multiply_by_logistic_derivative(SGMatrix< T > &a, SGMatrix< T > &result)
#define BACKEND_GENERIC_MULTIPLY_BY_RECTIFIED_LINEAR_DERIV (   Type,
  Container 
)
Value:
Container<Type>& a, Container<Type>& result) const;
void multiply_by_rectified_linear_derivative(SGMatrix< T > &a, SGMatrix< T > &result)

Implementation of

See also
linalg::multiply_by_rectified_linear_derivative

Definition at line 211 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_QR_SOLVER (   Type,
  Container 
)
Value:
virtual Container<Type> qr_solver( \
const SGMatrix<Type>& A, const Container<Type>& b) const;
Container< T > qr_solver(const SGMatrix< T > &A, const Container< T > &b)
#define BACKEND_GENERIC_RANGE_FILL (   Type,
  Container 
)    virtual void range_fill(Container<Type>& a, const Type start) const;
#define BACKEND_GENERIC_REAL_MEAN (   Type,
  Container 
)    virtual float64_t mean(const Container<Type>& a) const;
#define BACKEND_GENERIC_RECTIFIED_LINEAR (   Type,
  Container 
)
Value:
virtual void rectified_linear(Container<Type>& a, Container<Type>& result) \
const;
void rectified_linear(SGMatrix< T > &a, SGMatrix< T > &result)
#define BACKEND_GENERIC_ROWWISE_SUM (   Type,
  Container 
)
Value:
virtual SGVector<Type> rowwise_sum(const Container<Type>& a, bool no_diag) \
const;
SGVector< T > rowwise_sum(const SGMatrix< T > &mat, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::rowwise_sum

Definition at line 311 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_SET_CONST (   Type,
  Container 
)    virtual void set_const(Container<Type>& a, const Type value) const;
#define BACKEND_GENERIC_SOFTMAX (   Type,
  Container 
)    virtual void softmax(Container<Type>& a) const;
#define BACKEND_GENERIC_SQUARED_ERROR (   Type,
  Container 
)
Value:
virtual Type squared_error( \
const Container<Type>& P, const Container<Type>& Q) const;
T squared_error(const SGMatrix< T > p, const SGMatrix< T > q)
#define BACKEND_GENERIC_SUM (   Type,
  Container 
)    virtual Type sum(const Container<Type>& a, bool no_diag) const;

Implementation of

See also
LinalgBackendBase::sum

Definition at line 270 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_SVD (   Type,
  Container 
)
Value:
virtual void svd( \
const Container<Type>& A, SGVector<Type> s, Container<Type> U, \
bool thin_U, linalg::SVDAlgorithm alg) const;
void svd(const SGMatrix< T > &A, SGVector< T > &s, SGMatrix< T > &U, bool thin_U=true, SVDAlgorithm alg=SVDAlgorithm::BidiagonalDivideConquer)

Implementation of

See also
LinalgBackendBase::svd

Definition at line 325 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_SYMMETRIC_BLOCK_SUM (   Type,
  Container 
)
Value:
virtual Type sum_symmetric( \
const linalg::Block<Container<Type>>& a, bool no_diag) const;
T sum_symmetric(const SGMatrix< T > &a, bool no_diag=false)

Implementation of

See also
LinalgBackendBase::sum_symmetric

Definition at line 290 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_SYMMETRIC_SUM (   Type,
  Container 
)    virtual Type sum_symmetric(const Container<Type>& a, bool no_diag) const;

Implementation of

See also
LinalgBackendBase::sum_symmetric

Definition at line 284 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_TRACE (   Type,
  Container 
)    virtual Type trace(const Container<Type>& A) const;

Implementation of

See also
LinalgBackendBase::trace

Definition at line 333 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_TRANSPOSE_MATRIX (   Type,
  Container 
)    virtual Container<Type> transpose_matrix(const Container<Type>& A) const;

Implementation of

See also
LinalgBackendBase::transpose_matrix

Definition at line 339 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_TRIANGULAR_SOLVER (   Type,
  Container 
)
Value:
virtual Container<Type> triangular_solver( \
const SGMatrix<Type>& L, const Container<Type>& b, const bool lower) \
const;
Container< T > triangular_solver(const SGMatrix< T > &L, const Container< T > &b, const bool lower=true)

Implementation of

See also
LinalgBackendBase::triangular_solver

Definition at line 345 of file LinalgBackendEigen.h.

#define BACKEND_GENERIC_ZERO (   Type,
  Container 
)    virtual void zero(Container<Type>& a) const;

Implementation of

See also
LinalgBackendBase::zero

Definition at line 356 of file LinalgBackendEigen.h.


SHOGUN Machine Learning Toolbox - Documentation