MyraMath
geevd.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_DENSE_GEEVD_H
7 #define MYRAMATH_DENSE_GEEVD_H
8 
14 #include <myramath/MYRAMATH_EXPORT.h>
16 
17 namespace myra {
18 
19 // Forward declarations.
20 template<class Number> class Matrix;
21 template<class Number> class CMatrixRange;
22 template<class Number> class MatrixRange;
23 template<class Number> class DiagonalMatrix;
24 
25 // Implementation details of rgeevd_output.R() and rgeevd_output.L()
26 MYRAMATH_EXPORT Matrix<NumberC> rgeevd_untwiddle(const DiagonalMatrix<NumberC>& D, const Matrix<NumberS>& M);
27 MYRAMATH_EXPORT Matrix<NumberZ> rgeevd_untwiddle(const DiagonalMatrix<NumberZ>& D, const Matrix<NumberD>& M);
28 
30 template<class Precision> class rgeevd_output
31  {
32  public:
33 
35  typedef std::complex<Precision> Number;
36 
39 
41  Matrix<Number> R() const { return rgeevd_untwiddle(D,R_economy); }
42 
44  Matrix<Number> L() const { return rgeevd_untwiddle(D,L_economy); }
45 
48 
51 
52  };
53 
55 template<class Precision> class zgeevd_output
56  {
57  public:
58 
60  typedef std::complex<Precision> Number;
61 
64 
67 
70 
71  };
72 
74 MYRAMATH_EXPORT rgeevd_output<float > geevd(const CMatrixRange<NumberS>& A);
75 MYRAMATH_EXPORT rgeevd_output<double> geevd(const CMatrixRange<NumberD>& A);
76 MYRAMATH_EXPORT zgeevd_output<float > geevd(const CMatrixRange<NumberC>& A);
77 MYRAMATH_EXPORT zgeevd_output<double> geevd(const CMatrixRange<NumberZ>& A);
78 
79 } // namespace
80 
81 #endif
Matrix< Number > R() const
Returns Matrix R that satisfies the right eigenstatement, A*R = R*D.
Definition: geevd.h:41
DiagonalMatrix< Number > D
Eigenvalues of A.
Definition: geevd.h:38
Tabulates the values of a square NxN diagonal matrix. Allows random access, but only on the diagonal...
Definition: conjugate.h:23
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
std::complex< Precision > Number
Useful typedef.
Definition: geevd.h:60
Return type of complex-valued geevd(), encapsulates (D,L,R).
Definition: geevd.h:55
Definition: syntax.dox:1
Represents a const MatrixRange.
Definition: bothcat.h:22
Various utility functions/classes related to scalar Number types.
DiagonalMatrix< Number > D
Eigenvalues of A.
Definition: geevd.h:63
Matrix< Precision > L_economy
Economic storage for L, twiddled conjugate pairs of eigenvectors.
Definition: geevd.h:50
Matrix< Number > L
Matrix L that satisfies the left eigenstatement, L&#39;*A = D*L&#39;.
Definition: geevd.h:69
Matrix< Number > L() const
Returns Matrix L that satisfies the left eigenstatement, L&#39;*A = D*L&#39;.
Definition: geevd.h:44
Return type of real-valued geevd(), encapsulates (D,L,R).
Definition: geevd.h:30
Matrix< Precision > R_economy
Economic storage for R, twiddled conjugate pairs of eigenvectors.
Definition: geevd.h:47
Matrix< Number > R
Matrix R that satisfies the right eigenstatement, A*R = R*D.
Definition: geevd.h:66
std::complex< Precision > Number
Useful typedef.
Definition: geevd.h:35