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

Namespaces

namespace  detail
 

Classes

struct  FixedRectangularSVDResult
 
struct  FixedSquareSVDResult
 
struct  SVDResult
 

Functions

template<typename T>
vnl_matrix< T > CholeskyLowerTriangle (const vnl_matrix< T > &A)
 
template<typename TReal, unsigned int VDim>
TReal Determinant (const Matrix< TReal, VDim, VDim > &A)
 
template<typename TReal>
TReal Determinant (const vnl_matrix< TReal > &A)
 
template<typename TReal, unsigned int VDim>
TReal Determinant (const vnl_matrix_fixed< TReal, VDim, VDim > &A)
 
template<typename TReal, unsigned int VRows, unsigned int VColumns>
TReal Determinant (const vnl_matrix_fixed< TReal, VRows, VColumns > &A)
 
template<typename TReal>
Array2D< TReal > InverseSymmetric (const Array2D< TReal > &A)
 
template<typename TReal>
vnl_matrix< TReal > InverseSymmetric (const vnl_matrix< TReal > &A)
 
template<typename TReal>
Array2D< TReal > SolveSymmetric (const Array2D< TReal > &A, const Array2D< TReal > &B)
 
template<typename TReal>
Array< TReal > SolveSymmetric (const Array2D< TReal > &A, const Array< TReal > &b)
 
template<typename TReal, unsigned int VDim>
Vector< TReal, VDim > SolveSymmetric (const Matrix< TReal, VDim, VDim > &A, const Vector< TReal, VDim > &b)
 
template<typename TReal>
vnl_matrix< TReal > SolveSymmetric (const vnl_matrix< TReal > &A, const vnl_matrix< TReal > &B)
 
template<typename TReal>
vnl_vector< TReal > SolveSymmetric (const vnl_matrix< TReal > &A, const vnl_vector< TReal > &b)
 
template<typename TReal, unsigned int VDim>
vnl_vector_fixed< TReal, VDim > SolveSymmetric (const vnl_matrix_fixed< TReal, VDim, VDim > &A, const vnl_vector_fixed< TReal, VDim > &b)
 
template<typename T>
vnl_vector< T > SolveSymmetricPositiveDefinite (const vnl_matrix< T > &A, const vnl_vector< T > &b)
 
template<typename TReal, unsigned int VDim>
FixedSquareSVDResult< TReal, VDim > SVD (const Matrix< TReal, VDim, VDim > &A, bool canonicalizeSigns=true)
 
template<typename TReal, unsigned int VRows, unsigned int VCols, typename = std::enable_if_t<VRows != VCols>>
FixedRectangularSVDResult< TReal, VRows, VCols > SVD (const Matrix< TReal, VRows, VCols > &A, bool canonicalizeSigns=true)
 
template<typename TReal>
SVDResult< TReal > SVD (const vnl_matrix< TReal > &A, bool canonicalizeSigns=true)
 
template<typename TReal, unsigned int VDim>
FixedSquareSVDResult< TReal, VDim > SVD (const vnl_matrix_fixed< TReal, VDim, VDim > &A, bool canonicalizeSigns=true)
 
template<typename TReal, unsigned int VRows, unsigned int VCols, typename = std::enable_if_t<VRows != VCols>>
FixedRectangularSVDResult< TReal, VRows, VCols > SVD (const vnl_matrix_fixed< TReal, VRows, VCols > &A, bool canonicalizeSigns=true)
 

Function Documentation

◆ CholeskyLowerTriangle()

template<typename T>
vnl_matrix< T > itk::bridge::Math::CholeskyLowerTriangle ( const vnl_matrix< T > & A)

Lower-triangular Cholesky factor L of A = L L^T (A symmetric pos. def.), via Eigen LLT. Mirrors vnl_cholesky::lower_triangle().

Definition at line 70 of file itkBridgeCholeskySolve.h.

◆ Determinant() [1/3]

template<typename TReal, unsigned int VDim>
TReal itk::bridge::Math::Determinant ( const Matrix< TReal, VDim, VDim > & A)

Determinant of a fixed-size square itk::Matrix.

Definition at line 97 of file itkBridgeMathDeterminant.h.

References Determinant(), and itk::Matrix< T, VRows, VColumns >::GetVnlMatrix().

◆ Determinant() [2/3]

template<typename TReal>
TReal itk::bridge::Math::Determinant ( const vnl_matrix< TReal > & A)

Determinant of a runtime-sized square vnl_matrix.

Definition at line 105 of file itkBridgeMathDeterminant.h.

References itk::bridge::Math::detail::DynamicDeterminantEigen().

◆ Determinant() [3/3]

template<typename TReal, unsigned int VRows, unsigned int VColumns>
TReal itk::bridge::Math::Determinant ( const vnl_matrix_fixed< TReal, VRows, VColumns > & A)

Non-square-typed fixed matrices (e.g. the 3 x PointDimension matrices in mesh cells) forward to the runtime path, which requires the actual matrix be square. The square overload above is more specialized and wins when the type is square.

Definition at line 121 of file itkBridgeMathDeterminant.h.

References Determinant().

◆ InverseSymmetric()

template<typename TReal>
vnl_matrix< TReal > itk::bridge::Math::InverseSymmetric ( const vnl_matrix< TReal > & A)

Symmetric inverse on vnl types (convenience).

Definition at line 259 of file itkBridgeMathLDLT.h.

References itk::bridge::Math::detail::InverseSymmetricLDLTEigen().

◆ SolveSymmetric() [1/5]

template<typename TReal>
Array2D< TReal > itk::bridge::Math::SolveSymmetric ( const Array2D< TReal > & A,
const Array2D< TReal > & B )

Solve the symmetric system A X = B for a matrix right-hand side B via a single LDLT factorization (all columns solved together – O(n^3), not one factorization per column). A must be symmetric.

Definition at line 206 of file itkBridgeMathLDLT.h.

References itk::bridge::Math::detail::SolveSymmetricMatrixLDLTEigen().

◆ SolveSymmetric() [2/5]

template<typename TReal, unsigned int VDim>
Vector< TReal, VDim > itk::bridge::Math::SolveSymmetric ( const Matrix< TReal, VDim, VDim > & A,
const Vector< TReal, VDim > & b )

◆ SolveSymmetric() [3/5]

template<typename TReal>
vnl_matrix< TReal > itk::bridge::Math::SolveSymmetric ( const vnl_matrix< TReal > & A,
const vnl_matrix< TReal > & B )

Multi-RHS symmetric solve on vnl types (convenience).

Definition at line 244 of file itkBridgeMathLDLT.h.

References itk::bridge::Math::detail::SolveSymmetricMatrixLDLTEigen().

◆ SolveSymmetric() [4/5]

template<typename TReal>
vnl_vector< TReal > itk::bridge::Math::SolveSymmetric ( const vnl_matrix< TReal > & A,
const vnl_vector< TReal > & b )

Runtime-sized symmetric solve on vnl types (convenience).

Definition at line 177 of file itkBridgeMathLDLT.h.

References itk::bridge::Math::detail::SolveSymmetricLDLTEigen().

◆ SolveSymmetric() [5/5]

template<typename TReal, unsigned int VDim>
vnl_vector_fixed< TReal, VDim > itk::bridge::Math::SolveSymmetric ( const vnl_matrix_fixed< TReal, VDim, VDim > & A,
const vnl_vector_fixed< TReal, VDim > & b )

Fixed-size symmetric solve on vnl types (convenience).

Definition at line 192 of file itkBridgeMathLDLT.h.

References itk::bridge::Math::detail::SolveSymmetricLDLTEigen().

◆ SolveSymmetricPositiveDefinite()

template<typename T>
vnl_vector< T > itk::bridge::Math::SolveSymmetricPositiveDefinite ( const vnl_matrix< T > & A,
const vnl_vector< T > & b )

Solve A x = b for a symmetric positive (semi-)definite A, via Eigen LDL^T. The pivoted LDL^T is robust to rank-deficiency and ill-conditioning.

Definition at line 53 of file itkBridgeCholeskySolve.h.

◆ SVD() [1/4]

template<typename TReal, unsigned int VDim>
FixedSquareSVDResult< TReal, VDim > itk::bridge::Math::SVD ( const Matrix< TReal, VDim, VDim > & A,
bool canonicalizeSigns = true )

SVD of a fixed-size square itk::Matrix.

Definition at line 591 of file itkBridgeMathSVD.h.

References itk::Matrix< T, VRows, VColumns >::GetVnlMatrix(), and SVD().

◆ SVD() [2/4]

template<typename TReal, unsigned int VRows, unsigned int VCols, typename = std::enable_if_t<VRows != VCols>>
FixedRectangularSVDResult< TReal, VRows, VCols > itk::bridge::Math::SVD ( const Matrix< TReal, VRows, VCols > & A,
bool canonicalizeSigns = true )

SVD of a fixed-size rectangular itk::Matrix (thin U/V factors).

Definition at line 616 of file itkBridgeMathSVD.h.

References itk::Matrix< T, VRows, VColumns >::GetVnlMatrix(), and SVD().

◆ SVD() [3/4]

template<typename TReal>
SVDResult< TReal > itk::bridge::Math::SVD ( const vnl_matrix< TReal > & A,
bool canonicalizeSigns = true )

SVD of a runtime-sized vnl_matrix (square or rectangular). Square inputs take the fast square path (JacobiSVD+NoQRPreconditioner / BDCSVD); rectangular inputs use BDCSVD with thin U/V. The dispatch is a single dimension comparison.

Definition at line 626 of file itkBridgeMathSVD.h.

References itk::bridge::detail::CanonicalizeColumnSignsPaired(), itk::bridge::Math::detail::DynamicSquareSVDEigen(), itk::bridge::Math::detail::RectangularSVDEigen(), itk::bridge::Math::SVDResult< TReal >::U, itk::bridge::Math::SVDResult< TReal >::V, and itk::bridge::Math::SVDResult< TReal >::W.

◆ SVD() [4/4]

template<typename TReal, unsigned int VRows, unsigned int VCols, typename = std::enable_if_t<VRows != VCols>>
FixedRectangularSVDResult< TReal, VRows, VCols > itk::bridge::Math::SVD ( const vnl_matrix_fixed< TReal, VRows, VCols > & A,
bool canonicalizeSigns = true )

SVD of a fixed-size rectangular vnl_matrix_fixed (thin U/V factors); serves fixed non-square consumers such as an OutputDim x InputDim transform Jacobian. Square fixed inputs take the dedicated square overload.

Definition at line 601 of file itkBridgeMathSVD.h.

References itk::bridge::detail::CanonicalizeColumnSignsPaired(), itk::bridge::Math::detail::RectangularSVDEigen(), itk::bridge::Math::FixedRectangularSVDResult< TReal, VRows, VCols >::U, itk::bridge::Math::FixedRectangularSVDResult< TReal, VRows, VCols >::V, and itk::bridge::Math::FixedRectangularSVDResult< TReal, VRows, VCols >::W.