Public Member Functions | Private Member Functions | Private Attributes
SVD Class Reference

Singular value decomposition of a rectangular matrix. More...

Collaboration diagram for SVD:
Collaboration graph
[legend]

Public Member Functions

 SVD (const scalarRectangularMatrix &A, const scalar minCondition=0)
 Construct from a rectangular Matrix. More...
 
const scalarRectangularMatrixU () const
 Return U. More...
 
const scalarRectangularMatrixV () const
 Return the square matrix V. More...
 
const scalarDiagonalMatrixS () const
 Return the singular values. More...
 
const scalarRectangularMatrixVSinvUt () const
 Return VSinvUt (the pseudo inverse) More...
 
label nZeros () const
 Return the number of zero singular values. More...
 
scalar minNonZeroS () const
 Return the minimum non-zero singular value. More...
 

Private Member Functions

 SVD (const SVD &)
 Disallow default bitwise copy construct. More...
 
void operator= (const SVD &)
 Disallow default bitwise assignment. More...
 
template<class T >
const T sign (const T &a, const T &b)
 

Private Attributes

scalarRectangularMatrix U_
 Rectangular matrix with the same dimensions as the input. More...
 
scalarRectangularMatrix V_
 Square matrix V. More...
 
DiagonalMatrix< scalar > S_
 The singular values. More...
 
scalarRectangularMatrix VSinvUt_
 The matrix product V S^(-1) U^T. More...
 
label nZeros_
 The number of zero singular values. More...
 

Detailed Description

Singular value decomposition of a rectangular matrix.

Source files

Definition at line 52 of file SVD.H.

Constructor & Destructor Documentation

◆ SVD() [1/2]

SVD ( const SVD )
private

Disallow default bitwise copy construct.

◆ SVD() [2/2]

SVD ( const scalarRectangularMatrix A,
const scalar  minCondition = 0 
)

Member Function Documentation

◆ operator=()

void operator= ( const SVD )
private

Disallow default bitwise assignment.

◆ sign()

const T sign ( const T a,
const T b 
)
inlineprivate

Definition at line 29 of file SVDI.H.

References Foam::constant::physicoChemical::b.

Referenced by SVD::SVD().

Here is the caller graph for this function:

◆ U()

const Foam::scalarRectangularMatrix & U ( ) const
inline

Return U.

Definition at line 37 of file SVDI.H.

◆ V()

const Foam::scalarRectangularMatrix & V ( ) const
inline

Return the square matrix V.

Definition at line 42 of file SVDI.H.

◆ S()

const Foam::scalarDiagonalMatrix & S ( ) const
inline

Return the singular values.

Definition at line 47 of file SVDI.H.

Referenced by CentredFitSnGradData< Polynomial >::calcFit().

Here is the caller graph for this function:

◆ VSinvUt()

const Foam::scalarRectangularMatrix & VSinvUt ( ) const
inline

Return VSinvUt (the pseudo inverse)

Definition at line 52 of file SVDI.H.

Referenced by CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), and Foam::SVDinv().

Here is the caller graph for this function:

◆ nZeros()

Foam::label nZeros ( ) const
inline

Return the number of zero singular values.

Definition at line 57 of file SVDI.H.

◆ minNonZeroS()

Foam::scalar minNonZeroS ( ) const
inline

Return the minimum non-zero singular value.

Definition at line 62 of file SVDI.H.

References s().

Here is the call graph for this function:

Field Documentation

◆ U_

Rectangular matrix with the same dimensions as the input.

Definition at line 57 of file SVD.H.

Referenced by SVD::SVD().

◆ V_

Square matrix V.

Definition at line 60 of file SVD.H.

Referenced by SVD::SVD().

◆ S_

DiagonalMatrix<scalar> S_
private

The singular values.

Definition at line 63 of file SVD.H.

Referenced by SVD::SVD().

◆ VSinvUt_

scalarRectangularMatrix VSinvUt_
private

The matrix product V S^(-1) U^T.

Definition at line 66 of file SVD.H.

Referenced by SVD::SVD().

◆ nZeros_

label nZeros_
private

The number of zero singular values.

Definition at line 69 of file SVD.H.

Referenced by SVD::SVD().


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