ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::Math::detail Namespace Reference

Typedefs

template<typename TReal>
using CholeskyRowMajor = Eigen::Matrix<TReal, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
 
template<typename TReal>
using CholeskyVector = Eigen::Matrix<TReal, Eigen::Dynamic, 1>
 

Functions

template<unsigned int VDim, typename TReal>
TReal DeterminantEigen (const TReal *inData)
 
template<typename TVector>
auto DeterminantMagnitude (const TVector &W) -> std::decay_t< decltype(W[0])>
 
template<typename TReal>
TReal DynamicDeterminantEigen (const TReal *inData, unsigned int n)
 
template<typename TReal>
void DynamicSquareSVDEigen (const TReal *inData, unsigned int n, TReal *uData, TReal *wData, TReal *vData)
 
template void DynamicSquareSVDEigen< double > (const double *, unsigned int, double *, double *, double *)
 
template void DynamicSquareSVDEigen< float > (const float *, unsigned int, float *, float *, float *)
 
template<typename TReal>
void InverseSymmetricLDLTEigen (const TReal *aData, unsigned int n, TReal *invData)
 
template<unsigned int VRows, unsigned int VColumns, typename TReal>
void MatrixExponentialEigen (const TReal *inData, TReal *outData)
 
template<typename TReal>
void MatrixExponentialEigen (const TReal *inData, TReal *outData, unsigned int n)
 
template<typename TVector, typename TReal>
unsigned int NumericalRank (const TVector &W, TReal rcond)
 
template<typename TMatrixU, typename TVector, typename TMatrixV, typename TReal>
auto PseudoInverse (const TMatrixU &U, const TVector &W, const TMatrixV &V, TReal rcond)
 
template<typename TMatrixU, typename TVector, typename TMatrixV, typename TReal>
auto Recompose (const TMatrixU &U, const TVector &W, const TMatrixV &V, TReal rcond)
 
template<typename TMatrixU, typename TVector, typename TMatrixV>
auto RecomposeWith (const TMatrixU &U, const TVector &modifiedW, const TMatrixV &V)
 
template<typename TReal>
void RectangularSVDEigen (const TReal *inData, unsigned int rows, unsigned int cols, TReal *uData, TReal *wData, TReal *vData)
 
template void RectangularSVDEigen< double > (const double *, unsigned int, unsigned int, double *, double *, double *)
 
template void RectangularSVDEigen< float > (const float *, unsigned int, unsigned int, float *, float *, float *)
 
template<typename TReal>
TReal ResolveRcond (TReal rcond, unsigned int n)
 
template<typename TMatrixU, typename TVector, typename TMatrixV, typename TVectorB, typename TReal>
auto SolveLinear (const TMatrixU &U, const TVector &W, const TMatrixV &V, const TVectorB &b, TReal rcond)
 
template<typename TReal>
void SolveSymmetricLDLTEigen (const TReal *aData, const TReal *bData, unsigned int n, TReal *xData)
 
template<typename TReal>
void SolveSymmetricMatrixLDLTEigen (const TReal *aData, const TReal *bData, unsigned int n, unsigned int m, TReal *xData)
 
template<unsigned int VDim, typename TReal>
void SquareSVDEigen (const TReal *inData, TReal *uData, TReal *wData, TReal *vData)
 
template<typename TVector>
auto WellCondition (const TVector &W) -> std::decay_t< decltype(W[0])>
 

Variables

constexpr unsigned int kFixedSVDMaxDim = 16
 
constexpr unsigned int kJacobiMaxDim = 6
 

Detailed Description

Cholesky-based linear algebra for symmetric matrices, backed by Eigen.

Matrix exponential exp(A) for a real square matrix, backed by Eigen.

SolveSymmetricPositiveDefinite() uses Eigen's robust LDL^T (pivoted) factor, which handles near-semidefinite regularized Gram matrices. CholeskyLowerTriangle() returns the L of A = L L^T via Eigen's LLT.

Replacement for the removed vnl_matrix_exp. Delegates to Eigen's MatrixBase::exp(), which uses scaling-and-squaring with a degree-13 Pade approximant (Higham, SIAM J. Matrix Anal. Appl. 26(4), 2005) – more robust than the truncated Taylor series formerly provided by vnl_matrix_exp.

Typedef Documentation

◆ CholeskyRowMajor

template<typename TReal>
using itk::Math::detail::CholeskyRowMajor = Eigen::Matrix<TReal, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

Definition at line 44 of file itkCholeskySolve.h.

◆ CholeskyVector

template<typename TReal>
using itk::Math::detail::CholeskyVector = Eigen::Matrix<TReal, Eigen::Dynamic, 1>

Definition at line 46 of file itkCholeskySolve.h.

Function Documentation

◆ DeterminantEigen()

template<unsigned int VDim, typename TReal>
TReal itk::Math::detail::DeterminantEigen ( const TReal * inData)

Definition at line 44 of file itkMathDeterminant.h.

Referenced by itk::Math::Determinant(), and DynamicDeterminantEigen().

◆ DeterminantMagnitude()

template<typename TVector>
auto itk::Math::detail::DeterminantMagnitude ( const TVector & W) -> std::decay_t<decltype(W[0])>

◆ DynamicDeterminantEigen()

template<typename TReal>
TReal itk::Math::detail::DynamicDeterminantEigen ( const TReal * inData,
unsigned int n )

Definition at line 52 of file itkMathDeterminant.h.

References DeterminantEigen().

Referenced by itk::Math::Determinant().

◆ DynamicSquareSVDEigen()

template<typename TReal>
void itk::Math::detail::DynamicSquareSVDEigen ( const TReal * inData,
unsigned int n,
TReal * uData,
TReal * wData,
TReal * vData )

Definition at line 400 of file itkMathSVD.h.

References kJacobiMaxDim.

Referenced by SquareSVDEigen(), and itk::Math::SVD().

◆ DynamicSquareSVDEigen< double >()

template void itk::Math::detail::DynamicSquareSVDEigen< double > ( const double * ,
unsigned int ,
double * ,
double * ,
double *  )
extern

◆ DynamicSquareSVDEigen< float >()

template void itk::Math::detail::DynamicSquareSVDEigen< float > ( const float * ,
unsigned int ,
float * ,
float * ,
float *  )
extern

◆ InverseSymmetricLDLTEigen()

template<typename TReal>
void itk::Math::detail::InverseSymmetricLDLTEigen ( const TReal * aData,
unsigned int n,
TReal * invData )

Definition at line 105 of file itkMathLDLT.h.

Referenced by itk::Math::InverseSymmetric(), and itk::Math::InverseSymmetric().

◆ MatrixExponentialEigen() [1/2]

template<unsigned int VRows, unsigned int VColumns, typename TReal>
void itk::Math::detail::MatrixExponentialEigen ( const TReal * inData,
TReal * outData )

◆ MatrixExponentialEigen() [2/2]

template<typename TReal>
void itk::Math::detail::MatrixExponentialEigen ( const TReal * inData,
TReal * outData,
unsigned int n )

Definition at line 55 of file itkMatrixExponential.h.

◆ NumericalRank()

template<typename TVector, typename TReal>
unsigned int itk::Math::detail::NumericalRank ( const TVector & W,
TReal rcond )

Definition at line 93 of file itkMathSVD.h.

References ResolveRcond().

◆ PseudoInverse()

template<typename TMatrixU, typename TVector, typename TMatrixV, typename TReal>
auto itk::Math::detail::PseudoInverse ( const TMatrixU & U,
const TVector & W,
const TMatrixV & V,
TReal rcond )

Definition at line 59 of file itkMathSVD.h.

References ResolveRcond().

◆ Recompose()

template<typename TMatrixU, typename TVector, typename TMatrixV, typename TReal>
auto itk::Math::detail::Recompose ( const TMatrixU & U,
const TVector & W,
const TMatrixV & V,
TReal rcond )

Definition at line 112 of file itkMathSVD.h.

References ResolveRcond().

◆ RecomposeWith()

template<typename TMatrixU, typename TVector, typename TMatrixV>
auto itk::Math::detail::RecomposeWith ( const TMatrixU & U,
const TVector & modifiedW,
const TMatrixV & V )

◆ RectangularSVDEigen()

template<typename TReal>
void itk::Math::detail::RectangularSVDEigen ( const TReal * inData,
unsigned int rows,
unsigned int cols,
TReal * uData,
TReal * wData,
TReal * vData )

Definition at line 475 of file itkMathSVD.h.

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

◆ RectangularSVDEigen< double >()

template void itk::Math::detail::RectangularSVDEigen< double > ( const double * ,
unsigned int ,
unsigned int ,
double * ,
double * ,
double *  )
extern

◆ RectangularSVDEigen< float >()

template void itk::Math::detail::RectangularSVDEigen< float > ( const float * ,
unsigned int ,
unsigned int ,
float * ,
float * ,
float *  )
extern

◆ ResolveRcond()

template<typename TReal>
TReal itk::Math::detail::ResolveRcond ( TReal rcond,
unsigned int n )

Definition at line 50 of file itkMathSVD.h.

Referenced by NumericalRank(), PseudoInverse(), Recompose(), and SolveLinear().

◆ SolveLinear()

template<typename TMatrixU, typename TVector, typename TMatrixV, typename TVectorB, typename TReal>
auto itk::Math::detail::SolveLinear ( const TMatrixU & U,
const TVector & W,
const TMatrixV & V,
const TVectorB & b,
TReal rcond )

Definition at line 79 of file itkMathSVD.h.

References ResolveRcond().

◆ SolveSymmetricLDLTEigen()

template<typename TReal>
void itk::Math::detail::SolveSymmetricLDLTEigen ( const TReal * aData,
const TReal * bData,
unsigned int n,
TReal * xData )

◆ SolveSymmetricMatrixLDLTEigen()

template<typename TReal>
void itk::Math::detail::SolveSymmetricMatrixLDLTEigen ( const TReal * aData,
const TReal * bData,
unsigned int n,
unsigned int m,
TReal * xData )

Definition at line 85 of file itkMathLDLT.h.

Referenced by itk::Math::SolveSymmetric(), and itk::Math::SolveSymmetric().

◆ SquareSVDEigen()

template<unsigned int VDim, typename TReal>
void itk::Math::detail::SquareSVDEigen ( const TReal * inData,
TReal * uData,
TReal * wData,
TReal * vData )

Definition at line 437 of file itkMathSVD.h.

References DynamicSquareSVDEigen(), and kFixedSVDMaxDim.

Referenced by itk::Math::SVD().

◆ WellCondition()

template<typename TVector>
auto itk::Math::detail::WellCondition ( const TVector & W) -> std::decay_t<decltype(W[0])>

Variable Documentation

◆ kFixedSVDMaxDim

unsigned int itk::Math::detail::kFixedSVDMaxDim = 16
constexpr

Definition at line 390 of file itkMathSVD.h.

Referenced by SquareSVDEigen().

◆ kJacobiMaxDim

unsigned int itk::Math::detail::kJacobiMaxDim = 6
constexpr

Definition at line 394 of file itkMathSVD.h.

Referenced by DynamicSquareSVDEigen().