core
vnl
algo
vnl_generalized_eigensystem.h
Go to the documentation of this file.
1
// This is core/vnl/algo/vnl_generalized_eigensystem.h
2
#ifndef vnl_generalized_eigensystem_h_
3
#define vnl_generalized_eigensystem_h_
4
//:
5
// \file
6
// \brief Solves the generalized eigenproblem Ax=La
7
// \author Andrew W. Fitzgibbon, Oxford RRG
8
// \date 29 Aug 96
9
//
10
// \verbatim
11
// Modifications
12
// dac (Manchester) 28/03/2001: tidied up documentation
13
// Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
14
// \endverbatim
15
16
#include <
vnl/vnl_diag_matrix.h
>
17
#include <vnl/algo/vnl_algo_export.h>
18
19
//: Solves the generalized eigenproblem Ax=Bx
20
// Solves the generalized eigenproblem of $A x = \lambda B x$,
21
// with $A$ symmetric and $B$ positive definite. \n
22
// See Golub and van Loan, Section 8.7.
23
24
class
VNL_ALGO_EXPORT
vnl_generalized_eigensystem
25
{
26
public
:
27
// Public data members because they're unique.
28
long
n
;
29
30
//: Solves the generalized eigenproblem Ax=Bx
31
// Solve real generalized eigensystem $A x = \lambda B x$ for
32
// $\lambda$ and $x$, where $A$ symmetric, $B$ positive definite.
33
// Initializes storage for the matrix $V = [ x_0 x_1 .. x_n ]$ and
34
// the vnl_diag_matrix $D = [ \lambda_0 \lambda_1 ... \lambda_n ]$.
35
// The eigenvalues are sorted into increasing order (of value, not
36
// absolute value).
37
//
38
// Uses vnl_cholesky decomposition $C^\top C = B$, to convert to
39
// $C^{-\top} A C^{-1} x = \lambda x$ and then uses the
40
// symmetric eigensystem code. It will print a verbose warning
41
// if $B$ is not positive definite.
42
43
vnl_generalized_eigensystem
(
const
vnl_matrix<double>
& A,
44
const
vnl_matrix<double>
& B);
45
46
//: Public eigenvectors.
47
// After construction, this contains the matrix of eigenvectors.
48
vnl_matrix<double>
V
;
49
50
//: Public eigenvalues.
51
// After construction, this contains the diagonal matrix of eigenvalues, stored as a vector.
52
vnl_diag_matrix<double>
D
;
53
};
54
55
#endif // vnl_generalized_eigensystem_h_
vnl_generalized_eigensystem::V
vnl_matrix< double > V
Public eigenvectors.
Definition:
vnl_generalized_eigensystem.h:48
vnl_generalized_eigensystem::D
vnl_diag_matrix< double > D
Public eigenvalues.
Definition:
vnl_generalized_eigensystem.h:52
vnl_matrix< double >
vnl_diag_matrix< double >
vnl_generalized_eigensystem::n
long n
Definition:
vnl_generalized_eigensystem.h:28
vnl_generalized_eigensystem
Solves the generalized eigenproblem Ax=Bx.
Definition:
vnl_generalized_eigensystem.h:24
vnl_diag_matrix.h
Contains class for diagonal matrices.
Generated by
1.8.15