MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::DenseMatrixSVD Class Reference

Class for Singular Value Decomposition of a DenseMatrix. More...

#include <densemat.hpp>

Public Member Functions

MFEM_DEPRECATED DenseMatrixSVD (DenseMatrix &M, bool left_singular_vectors=false, bool right_singular_vectors=false)
 Constructor for the DenseMatrixSVD.
 
MFEM_DEPRECATED DenseMatrixSVD (int h, int w, bool left_singular_vectors=false, bool right_singular_vectors=false)
 Constructor for the DenseMatrixSVD.
 
 DenseMatrixSVD (DenseMatrix &M, char left_singular_vectors='A', char right_singular_vectors='A')
 Constructor for the DenseMatrixSVD.
 
 DenseMatrixSVD (int h, int w, char left_singular_vectors='A', char right_singular_vectors='A')
 Constructor for the DenseMatrixSVD.
 
void Eval (DenseMatrix &M)
 Evaluate the SVD.
 
VectorSingularvalues ()
 Return singular values.
 
real_t Singularvalue (int i)
 Return specific singular value.
 
DenseMatrixLeftSingularvectors ()
 Return left singular vectors.
 
DenseMatrixRightSingularvectors ()
 Return right singular vectors.
 
 ~DenseMatrixSVD ()
 

Detailed Description

Class for Singular Value Decomposition of a DenseMatrix.

Singular Value Decomposition (SVD) of a DenseMatrix with the use of the DGESVD driver from LAPACK.

Definition at line 955 of file densemat.hpp.

Constructor & Destructor Documentation

◆ DenseMatrixSVD() [1/4]

mfem::DenseMatrixSVD::DenseMatrixSVD ( DenseMatrix & M,
bool left_singular_vectors = false,
bool right_singular_vectors = false )

Constructor for the DenseMatrixSVD.

Constructor for the DenseMatrixSVD with LAPACK. The parameters for the left and right singular vectors can be choosen according to the parameters for the LAPACK DGESVD.

Parameters
[in]Mmatrix to set the size to n=M.Height(), m=M.Width()
[in]left_singular_vectorsoptional parameter to define if first left singular vectors should be computed
[in]right_singular_vectorsoptional parameter to define if first right singular vectors should be computed

Definition at line 4445 of file densemat.cpp.

◆ DenseMatrixSVD() [2/4]

mfem::DenseMatrixSVD::DenseMatrixSVD ( int h,
int w,
bool left_singular_vectors = false,
bool right_singular_vectors = false )

Constructor for the DenseMatrixSVD.

Constructor for the DenseMatrixSVD with LAPACK. The parameters for the left and right singular vectors can be choosen according to the parameters for the LAPACK DGESVD.

Parameters
[in]hheight of the matrix
[in]wwidth of the matrix
[in]left_singular_vectorsoptional parameter to define if first left singular vectors should be computed
[in]right_singular_vectorsoptional parameter to define if first right singular vectors should be computed

Definition at line 4456 of file densemat.cpp.

◆ DenseMatrixSVD() [3/4]

mfem::DenseMatrixSVD::DenseMatrixSVD ( DenseMatrix & M,
char left_singular_vectors = 'A',
char right_singular_vectors = 'A' )

Constructor for the DenseMatrixSVD.

Constructor for the DenseMatrixSVD with LAPACK. The parameters for the left and right singular vectors can be choosen according to the parameters for the LAPACK DGESVD.

Parameters
[in]Mmatrix to set the size to n=M.Height(), m=M.Width()
[in]left_singular_vectorsoptional parameter to define which left singular vectors should be computed
[in]right_singular_vectorsoptional parameter to define which right singular vectors should be computed

Options for computation of singular vectors:

'A': All singular vectors are computed (default)

'S': The first min(n,m) singular vectors are computed

'N': No singular vectors are computed

Definition at line 4467 of file densemat.cpp.

◆ DenseMatrixSVD() [4/4]

mfem::DenseMatrixSVD::DenseMatrixSVD ( int h,
int w,
char left_singular_vectors = 'A',
char right_singular_vectors = 'A' )

Constructor for the DenseMatrixSVD.

Constructor for the DenseMatrixSVD with LAPACK. The parameters for the left and right singular vectors can be choosen according to the parameters for the LAPACK DGESVD.

Parameters
[in]hheight of the matrix
[in]wwidth of the matrix
[in]left_singular_vectorsoptional parameter to define which left singular vectors should be computed
[in]right_singular_vectorsoptional parameter to define which right singular vectors should be computed

Options for computation of singular vectors:

'A': All singular vectors are computed (default)

'S': The first min(n,m) singular vectors are computed

'N': No singular vectors are computed

Definition at line 4478 of file densemat.cpp.

◆ ~DenseMatrixSVD()

mfem::DenseMatrixSVD::~DenseMatrixSVD ( )

Definition at line 4553 of file densemat.cpp.

Member Function Documentation

◆ Eval()

void mfem::DenseMatrixSVD::Eval ( DenseMatrix & M)

Evaluate the SVD.

Call of the DGESVD driver from LAPACK for the DenseMatrix M. The singular vectors are computed according to the setup in the call of the constructor.

Parameters
[in]MDenseMatrix the SVD should be evaluated for

Definition at line 4506 of file densemat.cpp.

◆ LeftSingularvectors()

DenseMatrix & mfem::DenseMatrixSVD::LeftSingularvectors ( )
inline

Return left singular vectors.

Returns
U DenseMatrix containing left singular vectors

Definition at line 1086 of file densemat.hpp.

◆ RightSingularvectors()

DenseMatrix & mfem::DenseMatrixSVD::RightSingularvectors ( )
inline

Return right singular vectors.

Returns
Vt DenseMatrix containing right singular vectors

Definition at line 1093 of file densemat.hpp.

◆ Singularvalue()

real_t mfem::DenseMatrixSVD::Singularvalue ( int i)
inline

Return specific singular value.

Returns
sv(i) i-th singular value

Definition at line 1079 of file densemat.hpp.

◆ Singularvalues()

Vector & mfem::DenseMatrixSVD::Singularvalues ( )
inline

Return singular values.

Returns
sv Vector containing all singular values

Definition at line 1072 of file densemat.hpp.


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