DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
EigenDecomposition.h
1
16
17
#pragma once
18
39
40
#if defined(EigenDecomposition_RECURSES)
41
#error Recursive header files inclusion detected in EigenDecomposition.h
42
#else
// defined(EigenDecomposition_RECURSES)
44
#define EigenDecomposition_RECURSES
45
46
#if !defined EigenDecomposition_h
48
#define EigenDecomposition_h
49
51
// Inclusions
52
#include <iostream>
53
#include "DGtal/base/Common.h"
54
#include "DGtal/kernel/PointVector.h"
55
#include "DGtal/math/linalg/SimpleMatrix.h"
57
58
namespace
DGtal
59
{
61
// template class EigenDecomposition
84
85
template
<DGtal::Dimension TN,
typename
TComponent,
typename
TMatrix=SimpleMatrix<TComponent, TN, TN> >
86
class
EigenDecomposition
87
{
88
// BOOST_CONCEPT_ASSERT(( CMatrix<TMatrix> ));
89
BOOST_CONCEPT_ASSERT
((
concepts::CEuclideanRing<TComponent>
));
90
BOOST_STATIC_ASSERT
(TN > 0 );
91
92
// ----------------------- Public types -----------------------------------
93
public
:
94
typedef
TComponent
Component
;
95
static
const
DGtal::Dimension
M
= TN;
96
static
const
DGtal::Dimension
N
= TN;
97
typedef
Component
Quantity
;
98
typedef
PointVector<N,Component>
RowVector
;
99
typedef
PointVector<M,Component>
ColumnVector
;
100
typedef
ColumnVector
Vector
;
101
typedef
TMatrix
Matrix
;
102
103
104
// ----------------------- Static constants ------------------------------
105
public
:
107
static
const
DGtal::Dimension
dimension
= TN;
109
static
const
DGtal::Dimension
dimensionMinusOne
= TN - 1;
110
111
// ----------------------- Static services ------------------------------
112
public
:
113
127
static
void
tridiagonalize
(
Matrix
& V,
Vector
& d,
Vector
& e );
128
151
static
void
decomposeQL
(
Matrix
& V,
Vector
& d,
Vector
e );
152
165
static
void
getEigenDecomposition
(
const
Matrix
& matrix,
Matrix
& eigenVectors,
Vector
& eigenValues );
166
167
168
// ------------------------- Protected Data ------------------------------
169
private
:
170
// ------------------------- Private Data --------------------------------
171
private
:
172
173
// ------------------------- Hidden services ------------------------------
174
protected
:
175
176
177
// ------------------------- Internals ------------------------------------
178
private
:
179
180
};
// end of class EigenDecomposition
181
182
}
// namespace DGtal
183
184
186
// Includes inline functions.
187
#include "DGtal/math/linalg/EigenDecomposition.ih"
188
189
// //
191
192
#endif
// !defined EigenDecomposition_h
193
194
#undef EigenDecomposition_RECURSES
195
#endif
// else defined(EigenDecomposition_RECURSES)
DGtal::EigenDecomposition
Aim: This class provides methods to compute the eigen decomposition of a matrix. Its objective is to ...
Definition
EigenDecomposition.h:87
DGtal::EigenDecomposition::getEigenDecomposition
static void getEigenDecomposition(const Matrix &matrix, Matrix &eigenVectors, Vector &eigenValues)
Compute both eigen vectors and eigen values from an input matrix.
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::Component
Scalar Component
Definition
EigenDecomposition.h:94
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::ColumnVector
PointVector< M, Component > ColumnVector
Definition
EigenDecomposition.h:99
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::Vector
ColumnVector Vector
Definition
EigenDecomposition.h:100
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::dimensionMinusOne
static const DGtal::Dimension dimensionMinusOne
Definition
EigenDecomposition.h:109
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::N
static const DGtal::Dimension N
Definition
EigenDecomposition.h:96
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::RowVector
PointVector< N, Component > RowVector
Definition
EigenDecomposition.h:98
DGtal::EigenDecomposition::tridiagonalize
static void tridiagonalize(Matrix &V, Vector &d, Vector &e)
Reduces a real symmetric matrix to a symmetric tridiagonal matrix using and accumulating orthogonal s...
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::Quantity
Component Quantity
Definition
EigenDecomposition.h:97
DGtal::EigenDecomposition::decomposeQL
static void decomposeQL(Matrix &V, Vector &d, Vector e)
finds the eigenvalues and eigenvectors of a symmetric tridiagonal matrix by the QL method....
DGtal::EigenDecomposition::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< TComponent >))
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::dimension
static const DGtal::Dimension dimension
Definition
EigenDecomposition.h:107
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::Matrix
SimpleMatrix< Scalar, TN, TN > Matrix
Definition
EigenDecomposition.h:101
DGtal::EigenDecomposition< KSpace::dimension, Scalar >::M
static const DGtal::Dimension M
Definition
EigenDecomposition.h:95
DGtal::EigenDecomposition::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT(TN > 0)
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition
PointVector.h:593
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::Dimension
DGtal::uint32_t Dimension
Definition
Common.h:119
DGtal::concepts::CEuclideanRing
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Definition
CEuclideanRing.h:88
src
DGtal
math
linalg
EigenDecomposition.h
Generated on
for DGtal by
1.18.0