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

Classes

struct  EigenLevenbergMarquardtOptions
 
struct  EigenLevenbergMarquardtResult
 
class  VectorContainer
 

Functions

ITKOptimizers_EXPORT EigenLevenbergMarquardtResult EigenLevenbergMarquardtSolve (unsigned int numberOfParameters, unsigned int numberOfResiduals, const std::function< void(const double *, double *)> &residual, const std::function< void(const double *, double *)> &jacobian, const vnl_vector< double > &initialPosition, const EigenLevenbergMarquardtOptions &options)
 
template<typename TValueType, unsigned int VRows, unsigned int VColumns>
const TValueType * GetPointerToMatrixData (const itk::Matrix< TValueType, VRows, VColumns > &inputMatrix)
 
template<typename TValueType>
const TValueType * GetPointerToMatrixData (const vnl_matrix< TValueType > &inputMatrix)
 
template<typename TValueType, unsigned int VRows, unsigned int VColumns>
const TValueType * GetPointerToMatrixData (const vnl_matrix_fixed< TValueType, VRows, VColumns > &inputMatrix)
 
template<typename QMatrix>
void permuteColumnsWithSortIndices (QMatrix &eigenVectors, const std::vector< int > &indicesSortPermutations)
 
template<typename TArray>
std::vector< int > sortEigenValuesByMagnitude (TArray &eigenValues, const unsigned int numberOfElements)
 

Function Documentation

◆ EigenLevenbergMarquardtSolve()

ITKOptimizers_EXPORT EigenLevenbergMarquardtResult itk::detail::EigenLevenbergMarquardtSolve ( unsigned int numberOfParameters,
unsigned int numberOfResiduals,
const std::function< void(const double *, double *)> & residual,
const std::function< void(const double *, double *)> & jacobian,
const vnl_vector< double > & initialPosition,
const EigenLevenbergMarquardtOptions & options )

Solve a nonlinear least-squares problem with Eigen's MINPACK-port Levenberg-Marquardt (unsupported/Eigen/NonLinearOptimization).

This is the algorithm-identical counterpart to vnl_levenberg_marquardt (both are ports of MINPACK lmdif/lmder). Eigen is confined to the implementation; no Eigen type appears in this interface (see issue #6230).

Parameters
numberOfParametersn, the size of x.
numberOfResidualsm, the size of the residual vector.
residualFills m residuals from n parameters (raw pointers).
jacobianFills the m-by-n Jacobian, row-major, from n parameters. If empty, forward differences are used.
initialPositionStarting x (size n).
optionsTolerances / evaluation limit.

◆ GetPointerToMatrixData() [1/3]

template<typename TValueType, unsigned int VRows, unsigned int VColumns>
const TValueType * itk::detail::GetPointerToMatrixData ( const itk::Matrix< TValueType, VRows, VColumns > & inputMatrix)

◆ GetPointerToMatrixData() [2/3]

template<typename TValueType>
const TValueType * itk::detail::GetPointerToMatrixData ( const vnl_matrix< TValueType > & inputMatrix)

Definition at line 44 of file itkSymmetricEigenAnalysis.h.

◆ GetPointerToMatrixData() [3/3]

template<typename TValueType, unsigned int VRows, unsigned int VColumns>
const TValueType * itk::detail::GetPointerToMatrixData ( const vnl_matrix_fixed< TValueType, VRows, VColumns > & inputMatrix)

Definition at line 38 of file itkSymmetricEigenAnalysis.h.

◆ permuteColumnsWithSortIndices()

template<typename QMatrix>
void itk::detail::permuteColumnsWithSortIndices ( QMatrix & eigenVectors,
const std::vector< int > & indicesSortPermutations )

◆ sortEigenValuesByMagnitude()

template<typename TArray>
std::vector< int > itk::detail::sortEigenValuesByMagnitude ( TArray & eigenValues,
const unsigned int numberOfElements )

Sort input to be ordered by magnitude, and returns container with the permutations required for the sorting.

For example, if input eigenValues = {10, 0, 40}, the output would be: {2,0,1} and the eigenValues would be modified in-place: {40, 10, 0}.

The permutations indices is used to order the matrix of eigenVectors.

See also
permuteEigenVectorsWithSortPermutations
Template Parameters
TArrayarray type with operator []
Parameters
eigenValuesinput array, requires operator []
numberOfElementssize of array
Returns
the permutations needed to sort the input array

Definition at line 73 of file itkSymmetricEigenAnalysis.h.

References itk::Math::Absolute().

Referenced by itk::SymmetricEigenAnalysis< TInput, TOutput >::ComputeEigenValuesAndVectorsWithEigenLibraryImpl(), itk::SymmetricEigenAnalysis< TInput, TOutput >::ComputeEigenValuesAndVectorsWithEigenLibraryImpl(), itk::SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType >::ComputeEigenValuesAndVectorsWithEigenLibraryImpl(), itk::SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType >::ComputeEigenValuesAndVectorsWithEigenLibraryImpl(), itk::SymmetricEigenAnalysis< TInput, TOutput >::ComputeEigenValuesWithEigenLibraryImpl(), itk::SymmetricEigenAnalysis< TInput, TOutput >::ComputeEigenValuesWithEigenLibraryImpl(), itk::SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType >::ComputeEigenValuesWithEigenLibraryImpl(), and itk::SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType >::ComputeEigenValuesWithEigenLibraryImpl().