![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Jacobi eigen vectors/values decomposition. More...
#include <Jacobi.h>
Public Types | |
| using | SquareMatrix = cloudViewer::SquareMatrixTpl< Scalar > |
| using | EigenValues = std::vector< Scalar > |
Static Public Member Functions | |
| static bool | ComputeEigenValuesAndVectors2 (const SquareMatrix &matrix, SquareMatrix &eigenVectors, EigenValues &eigenValues, unsigned maxIterationCount=50) |
| Computes the eigenvalues and eigenvectors of a given square matrix. More... | |
| static bool | ComputeEigenValuesAndVectors (const SquareMatrix &matrix, SquareMatrix &eigenVectors, EigenValues &eigenValues, bool absoluteValues=true, unsigned maxIterationCount=50) |
| Computes eigen vectors (and values) with the Jacobian method. More... | |
| static bool | SortEigenValuesAndVectors (SquareMatrix &eigenVectors, EigenValues &eigenValues) |
| static bool | GetEigenVector (const SquareMatrix &eigenVectors, unsigned index, Scalar eigenVector[]) |
| Returns the given eigenvector. More... | |
| static bool | GetMaxEigenValueAndVector (const SquareMatrix &eigenVectors, const EigenValues &eigenValues, Scalar &maxEigenValue, Scalar maxEigenVector[]) |
| Returns the biggest eigenvalue and its associated eigenvector. More... | |
| static bool | GetMinEigenValueAndVector (const SquareMatrix &eigenVectors, const EigenValues &eigenValues, Scalar &minEigenValue, Scalar minEigenVector[]) |
| Returns the smallest eigenvalue and its associated eigenvector. More... | |
Jacobi eigen vectors/values decomposition.
| using Jacobi< Scalar >::EigenValues = std::vector<Scalar> |
| using Jacobi< Scalar >::SquareMatrix = cloudViewer::SquareMatrixTpl<Scalar> |
|
inlinestatic |
Computes eigen vectors (and values) with the Jacobian method.
See the Numerical Recipes.
Definition at line 183 of file Jacobi.h.
References abs(), cloudViewer::SquareMatrixTpl< Scalar >::isValid(), cloudViewer::SquareMatrixTpl< Scalar >::m_values, ROTATE, cloudViewer::SquareMatrixTpl< Scalar >::size(), and cloudViewer::SquareMatrixTpl< Scalar >::toIdentity().
Referenced by ccCompass::estimateStrain(), and ccCompass::estimateStructureNormals().
|
inlinestatic |
Computes the eigenvalues and eigenvectors of a given square matrix.
It uses Rutishauser's modfications of the classical Jacobi rotation method with threshold pivoting.
Note: this code is inspired from John Burkardt's 'jacobi_eigenvalue'
code See https://people.sc.fsu.edu/~jburkardt/cpp_src/jacobi_eigenvalue/jacobi_eigenvalue.cpp
\warning DGM: this method gives strange results in some particular
cases!!!
\param[in] matrix input square matrix \param[out] eigenVectors eigenvectors (as a square matrix) \param[out] eigenValues eigenvalues \param[in] maxIterationCount max number of iteration (optional) \return success
Definition at line 45 of file Jacobi.h.
References cloudViewer::SquareMatrixTpl< Scalar >::isValid(), cloudViewer::SquareMatrixTpl< Scalar >::m_values, cloudViewer::SquareMatrixTpl< Scalar >::size(), and cloudViewer::SquareMatrixTpl< Scalar >::toIdentity().
|
inlinestatic |
Returns the given eigenvector.
| eigenVectors | eigenvectors (as a square matrix) |
| index | requested eigenvector index (< eigenvectors matrix size) |
| eigenVector | output vector (size = matrix size) |
Definition at line 364 of file Jacobi.h.
References cloudViewer::SquareMatrixTpl< Scalar >::m_values, and cloudViewer::SquareMatrixTpl< Scalar >::size().
Referenced by cloudViewer::Neighbourhood::computeMomentOrder1(), Jacobi< Scalar >::GetMaxEigenValueAndVector(), and Jacobi< Scalar >::GetMinEigenValueAndVector().
|
inlinestatic |
Returns the biggest eigenvalue and its associated eigenvector.
| eigenVectors | eigenvectors (as a square matrix) |
| eigenValues | eigenvalues |
| maxEigenValue | biggest eigenvalue |
| maxEigenVector | eigenvector vector corresponding to the biggest eigenvalue |
Definition at line 385 of file Jacobi.h.
References Jacobi< Scalar >::GetEigenVector(), cloudViewer::SquareMatrixTpl< Scalar >::isValid(), and cloudViewer::SquareMatrixTpl< Scalar >::size().
Referenced by cloudViewer::Neighbourhood::computeLeastSquareBestFittingPlane(), and cloudViewer::RegistrationTools::RegistrationProcedure().
|
inlinestatic |
Returns the smallest eigenvalue and its associated eigenvector.
| eigenVectors | eigenvectors (as a square matrix) |
| eigenValues | eigenvalues |
| minEigenValue | smallest eigenvalue |
| minEigenVector | eigenvector vector corresponding to the smallest eigenvalue |
Definition at line 410 of file Jacobi.h.
References Jacobi< Scalar >::GetEigenVector(), cloudViewer::SquareMatrixTpl< Scalar >::isValid(), and cloudViewer::SquareMatrixTpl< Scalar >::size().
Referenced by ComputeCorePointNormal(), and cloudViewer::Neighbourhood::computeLeastSquareBestFittingPlane().
|
inlinestatic |
Sorts the eigenvectors in the decreasing order of their associated eigenvalues
| eigenVectors | eigenvectors (as a square matrix) |
| eigenValues | eigenvalues |
Definition at line 333 of file Jacobi.h.
References cloudViewer::SquareMatrixTpl< Scalar >::isValid(), cloudViewer::SquareMatrixTpl< Scalar >::m_values, cloudViewer::SquareMatrixTpl< Scalar >::size(), and std::swap().
Referenced by cloudViewer::Neighbourhood::computeFeature(), cloudViewer::Neighbourhood::computeMomentOrder1(), DimensionalityScaleParamsComputer::computeScaleParams(), ccCompass::estimateStrain(), and ccCompass::estimateStructureNormals().