ARPACK-Armadillo
GeneralLU< Scalar > Class Template Reference

#include <GeneralLU.h>

Public Member Functions

 GeneralLU ()
 
 GeneralLU (const Matrix &mat)
 
void compute (const Matrix &mat)
 
void solve (Vector &vec_in, Vector &vec_out)
 

Detailed Description

template<typename Scalar = double>
class GeneralLU< Scalar >

Perform the LU decomposition of a square matrix.

Template Parameters
ScalarThe element type of the matrix. Currently supported types are float and double.

This class is a wrapper of the Lapack functions _getrf and _getrs.

Definition at line 30 of file GeneralLU.h.

Constructor & Destructor Documentation

template<typename Scalar = double>
GeneralLU< Scalar >::GeneralLU ( )
inline

Default constructor to create an object that stores the LU decomposition of a square matrix. Factorization can be performed later by calling the compute() method.

Definition at line 48 of file GeneralLU.h.

template<typename Scalar = double>
GeneralLU< Scalar >::GeneralLU ( const Matrix &  mat)
inline

Constructor to create an object that performs and stores the LU decomposition of a square matrix mat.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined.

Definition at line 59 of file GeneralLU.h.

Member Function Documentation

template<typename Scalar = double>
void GeneralLU< Scalar >::compute ( const Matrix &  mat)
inline

Conduct the LU factorization of a square matrix.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined.

Definition at line 72 of file GeneralLU.h.

template<typename Scalar = double>
void GeneralLU< Scalar >::solve ( Vector &  vec_in,
Vector &  vec_out 
)
inline

Use the computed LU factorization to solve linear equation \(Ax=b\), where \(A\) is the matrix factorized.

Parameters
vec_inThe vector \(b\).
vec_outThe vector \(x\) to be solved, which will be overwritten by the calculated solution.

Vector type can be arma::vec or arma::fvec, depending on the template parameter Scalar defined.

Definition at line 104 of file GeneralLU.h.


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