ARPACK-Armadillo
SparseGenMatProd< Scalar > Class Template Reference

#include <SparseGenMatProd.h>

Public Member Functions

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

Detailed Description

template<typename Scalar>
class SparseGenMatProd< Scalar >

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

Constructor & Destructor Documentation

template<typename Scalar >
SparseGenMatProd< Scalar >::SparseGenMatProd ( const SpMatrix &  mat_)
inline

Constructor to create the matrix operation object.

Parameters
mat_An Armadillo sparse matrix object, whose type can be arma::sp_mat or arma::sp_fmat, depending on the template parameter Scalar defined.

Definition at line 37 of file SparseGenMatProd.h.

Member Function Documentation

template<typename Scalar >
int SparseGenMatProd< Scalar >::rows ( )
inline

Return the number of rows of the underlying matrix.

Definition at line 44 of file SparseGenMatProd.h.

template<typename Scalar >
int SparseGenMatProd< Scalar >::cols ( )
inline

Return the number of columns of the underlying matrix.

Definition at line 48 of file SparseGenMatProd.h.

template<typename Scalar >
void SparseGenMatProd< Scalar >::perform_op ( Scalar *  x_in,
Scalar *  y_out 
)
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 57 of file SparseGenMatProd.h.


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