Loading...
Searching...
No Matches
SVD Class Reference

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

#include <SVD.H>

Public Member Functions

 SVD (const SVD &)=delete
 No copy construct.
void operator= (const SVD &)=delete
 No copy assignment.
 SVD (const scalarRectangularMatrix &A, const scalar minCondition=0)
 Construct from a rectangular Matrix.
const scalarRectangularMatrixU () const noexcept
 Return U.
const scalarRectangularMatrixV () const noexcept
 Return the square matrix V.
const scalarDiagonalMatrixS () const noexcept
 Return the singular values.
bool converged () const noexcept
 Return the minimum non-zero singular value.
label nZeros () const noexcept
 Return the number of zero singular values.
scalar minNonZeroS () const
 Return the minimum non-zero singular value.
scalarRectangularMatrix VSinvUt () const
 Return the matrix product V S^(-1) U^T (the pseudo inverse).

Static Public Member Functions

static scalarRectangularMatrix pinv (const scalarRectangularMatrix &A, const scalar minCondition=0)
 Return the pseudo inverse of the given matrix.
static Tensor< scalar > pinv (const Tensor< scalar > &A, const scalar minCondition=0)
 Return the pseudo inverse of the given tensor.

Detailed Description

Singular value decomposition of a rectangular matrix.

Source files

Definition at line 50 of file SVD.H.

Constructor & Destructor Documentation

◆ SVD() [1/2]

SVD ( const SVD & )
delete

No copy construct.

References SVD().

Referenced by operator=(), pinv(), and SVD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SVD() [2/2]

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

Construct from a rectangular Matrix.

Definition at line 446 of file SVD.C.

References A, n, and Foam::SVDcomp().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

void operator= ( const SVD & )
delete

No copy assignment.

References A, and SVD().

Here is the call graph for this function:

◆ U()

const scalarRectangularMatrix & U ( ) const
inlinenoexcept

Return U.

Definition at line 112 of file SVD.H.

References Foam::noexcept.

Referenced by chemPointISAT< CompType, ThermoType >::chemPointISAT().

Here is the caller graph for this function:

◆ V()

const scalarRectangularMatrix & V ( ) const
inlinenoexcept

Return the square matrix V.

Definition at line 117 of file SVD.H.

References Foam::noexcept.

Referenced by chemPointISAT< CompType, ThermoType >::chemPointISAT().

Here is the caller graph for this function:

◆ S()

const scalarDiagonalMatrix & S ( ) const
inlinenoexcept

Return the singular values.

Definition at line 122 of file SVD.H.

References Foam::noexcept.

Referenced by CentredFitSnGradData< Polynomial >::calcFit(), and chemPointISAT< CompType, ThermoType >::chemPointISAT().

Here is the caller graph for this function:

◆ converged()

bool converged ( ) const
inlinenoexcept

Return the minimum non-zero singular value.

Definition at line 127 of file SVD.H.

References Foam::noexcept.

◆ nZeros()

label nZeros ( ) const
inlinenoexcept

Return the number of zero singular values.

Definition at line 132 of file SVD.H.

References Foam::noexcept.

◆ minNonZeroS()

Foam::scalar minNonZeroS ( ) const

Return the minimum non-zero singular value.

Definition at line 467 of file SVD.C.

References s().

Here is the call graph for this function:

◆ VSinvUt()

Foam::scalarRectangularMatrix VSinvUt ( ) const

Return the matrix product V S^(-1) U^T (the pseudo inverse).

Definition at line 479 of file SVD.C.

References Foam::inv(), Foam::multiply(), and VSinvUt().

Referenced by CentredFitSnGradData< Polynomial >::calcFit(), pinv(), leastSquares::stencilWeights(), and VSinvUt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinv() [1/2]

Foam::scalarRectangularMatrix pinv ( const scalarRectangularMatrix & A,
const scalar minCondition = 0 )
static

Return the pseudo inverse of the given matrix.

Definition at line 489 of file SVD.C.

References A, SVD(), and VSinvUt().

Referenced by Foam::SVDinv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinv() [2/2]

Foam::Tensor< Foam::scalar > pinv ( const Tensor< scalar > & A,
const scalar minCondition = 0 )
static

Return the pseudo inverse of the given tensor.

Definition at line 501 of file SVD.C.

References A, Foam::do_multiply(), Foam::inv(), and Foam::SVDcomp().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.H
  • src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C