ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::Math::SVDResult< TReal > Struct Template Reference

#include <itkMathSVD.h>

Detailed Description

template<typename TReal>
struct itk::Math::SVDResult< TReal >

Result of a runtime-sized SVD (square or rectangular): A == U diag(W) V^T, W descending. For an m x n input, U is m x k, V is n x k and W has length k = min(m, n) (thin factors). rcond < 0 auto-selects a k*epsilon threshold.

Definition at line 243 of file itkMathSVD.h.

Public Member Functions

TReal DeterminantMagnitude () const
 
vnl_vector< TReal > NullVector () const
 
vnl_matrix< TReal > PseudoInverse (TReal rcond=TReal{ -1 }) const
 
unsigned int Rank (TReal rcond=TReal{ -1 }) const
 
vnl_matrix< TReal > Recompose (TReal rcond=TReal{ -1 }) const
 
vnl_matrix< TReal > RecomposeWith (const vnl_vector< TReal > &modifiedW) const
 
vnl_vector< TReal > Solve (const vnl_vector< TReal > &b, TReal rcond=TReal{ -1 }) const
 
TReal WellCondition () const
 

Public Attributes

vnl_matrix< TReal > U {}
 
vnl_matrix< TReal > V {}
 
vnl_vector< TReal > W {}
 

Member Function Documentation

◆ DeterminantMagnitude()

template<typename TReal>
TReal itk::Math::SVDResult< TReal >::DeterminantMagnitude ( ) const
inline

Product of the singular values (magnitude of the determinant for a square A).

Definition at line 308 of file itkMathSVD.h.

References itk::Math::detail::DeterminantMagnitude(), and W.

◆ NullVector()

template<typename TReal>
vnl_vector< TReal > itk::Math::SVDResult< TReal >::NullVector ( ) const
inline

Singular vector for the smallest singular value (last column of V); spans the nullspace when A is rank-deficient. Defined only for rows >= cols: an underdetermined input's thin V (cols x min(rows,cols)) cannot span the nullspace, so this throws rather than return a misleading direction.

Definition at line 289 of file itkMathSVD.h.

References U, and V.

◆ PseudoInverse()

template<typename TReal>
vnl_matrix< TReal > itk::Math::SVDResult< TReal >::PseudoInverse ( TReal rcond = TReal{ -1 }) const
inline

Moore-Penrose pseudo-inverse A^+.

Definition at line 251 of file itkMathSVD.h.

◆ Rank()

template<typename TReal>
unsigned int itk::Math::SVDResult< TReal >::Rank ( TReal rcond = TReal{ -1 }) const
inline

Numerical rank (count of singular values above rcond*max(w)).

Definition at line 265 of file itkMathSVD.h.

◆ Recompose()

template<typename TReal>
vnl_matrix< TReal > itk::Math::SVDResult< TReal >::Recompose ( TReal rcond = TReal{ -1 }) const
inline

Reconstruct A with singular values at or below rcond*max(w) zeroed.

Definition at line 272 of file itkMathSVD.h.

◆ RecomposeWith()

template<typename TReal>
vnl_matrix< TReal > itk::Math::SVDResult< TReal >::RecomposeWith ( const vnl_vector< TReal > & modifiedW) const
inline

Reconstruct U diag(modifiedW) V^T with caller-supplied singular values.

Definition at line 279 of file itkMathSVD.h.

References itk::Math::detail::RecomposeWith(), U, and V.

◆ Solve()

template<typename TReal>
vnl_vector< TReal > itk::Math::SVDResult< TReal >::Solve ( const vnl_vector< TReal > & b,
TReal rcond = TReal{ -1 } ) const
inline

Least-squares / minimum-norm solution of A x = b.

Definition at line 258 of file itkMathSVD.h.

◆ WellCondition()

template<typename TReal>
TReal itk::Math::SVDResult< TReal >::WellCondition ( ) const
inline

Reciprocal condition number sigma_min/sigma_max (0 = singular, 1 = perfect).

Definition at line 301 of file itkMathSVD.h.

References W, and itk::Math::detail::WellCondition().

Member Data Documentation

◆ U

template<typename TReal>
vnl_matrix<TReal> itk::Math::SVDResult< TReal >::U {}

Definition at line 245 of file itkMathSVD.h.

Referenced by NullVector(), RecomposeWith(), and itk::Math::SVD().

◆ V

template<typename TReal>
vnl_matrix<TReal> itk::Math::SVDResult< TReal >::V {}

Definition at line 247 of file itkMathSVD.h.

Referenced by NullVector(), RecomposeWith(), and itk::Math::SVD().

◆ W

template<typename TReal>
vnl_vector<TReal> itk::Math::SVDResult< TReal >::W {}

Definition at line 246 of file itkMathSVD.h.

Referenced by DeterminantMagnitude(), itk::Math::SVD(), and WellCondition().


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