Spectra
Spectra::DenseGenMatProd< Scalar > Class Template Reference

#include <DenseGenMatProd.h>

Public Member Functions

 DenseGenMatProd (ConstGenericMatrix &mat_)
 
int rows () const
 
int cols () const
 
void perform_op (const Scalar *x_in, Scalar *y_out) const
 

Detailed Description

template<typename Scalar>
class Spectra::DenseGenMatProd< Scalar >

This class defines the matrix-vector multiplication operation on a general real matrix \(A\), i.e., calculating \(y=Ax\) for any vector \(x\). It is mainly used in the GenEigsSolver and SymEigsSolver eigen solvers.

Definition at line 30 of file DenseGenMatProd.h.

Constructor & Destructor Documentation

◆ DenseGenMatProd()

template<typename Scalar >
Spectra::DenseGenMatProd< Scalar >::DenseGenMatProd ( ConstGenericMatrix &  mat_)
inline

Constructor to create the matrix operation object.

Parameters
mat_An Eigen matrix object, whose type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).

Definition at line 52 of file DenseGenMatProd.h.

Member Function Documentation

◆ rows()

template<typename Scalar >
int Spectra::DenseGenMatProd< Scalar >::rows ( ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 59 of file DenseGenMatProd.h.

◆ cols()

template<typename Scalar >
int Spectra::DenseGenMatProd< Scalar >::cols ( ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 63 of file DenseGenMatProd.h.

◆ perform_op()

template<typename Scalar >
void Spectra::DenseGenMatProd< Scalar >::perform_op ( const Scalar *  x_in,
Scalar *  y_out 
) const
inline

Perform the matrix-vector multiplication operation \(y=Ax\).

Parameters
x_inPointer to the \(x\) vector.
y_outPointer to the \(y\) vector.

Definition at line 72 of file DenseGenMatProd.h.


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