Spectra
Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex > Class Template Reference

#include <SparseGenMatProd.h>

Public Member Functions

 SparseGenMatProd (const SparseMatrix &mat_)
 
int rows () const
 
int cols () const
 
void perform_op (const Scalar *x_in, Scalar *y_out) const
 

Detailed Description

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
class Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex >

This class defines the matrix-vector multiplication operation on a sparse 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 25 of file SparseGenMatProd.h.

Constructor & Destructor Documentation

◆ SparseGenMatProd()

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex >::SparseGenMatProd ( const SparseMatrix &  mat_)
inline

Constructor to create the matrix operation object.

Parameters
mat_An Eigen sparse matrix object, whose type is Eigen::SparseMatrix<Scalar, ...>.

Definition at line 42 of file SparseGenMatProd.h.

Member Function Documentation

◆ rows()

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
int Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex >::rows ( ) const
inline

Return the number of rows of the underlying matrix.

Definition at line 49 of file SparseGenMatProd.h.

◆ cols()

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
int Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex >::cols ( ) const
inline

Return the number of columns of the underlying matrix.

Definition at line 53 of file SparseGenMatProd.h.

◆ perform_op()

template<typename Scalar, int Flags = 0, typename StorageIndex = int>
void Spectra::SparseGenMatProd< Scalar, Flags, StorageIndex >::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 62 of file SparseGenMatProd.h.


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