Logo ROOT  
Reference Guide
TMatrixDEigen.h
Go to the documentation of this file.
1 // @(#)root/matrix:$Id$
2 // Authors: Fons Rademakers, Eddy Offermann Dec 2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TMatrixDEigen
13 #define ROOT_TMatrixDEigen
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TMatrixDEigen //
18 // //
19 // Eigenvalues and eigenvectors of a real matrix. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TMatrixD.h"
24 #include "TVectorD.h"
25 
27 {
28 protected :
29 
30  static void MakeHessenBerg (TMatrixD &v,TVectorD &ortho,TMatrixD &H);
31  static void MakeSchurr (TMatrixD &v,TVectorD &d, TVectorD &e,TMatrixD &H);
32  static void Sort (TMatrixD &v,TVectorD &d, TVectorD &e);
33 
34  TMatrixD fEigenVectors; // Eigen-vectors of matrix
35  TVectorD fEigenValuesRe; // Eigen-values
36  TVectorD fEigenValuesIm; // Eigen-values
37 
38 public :
39 
40  enum {kWorkMax = 100}; // size of work array
41 
44  TMatrixDEigen(const TMatrixD &a);
45  TMatrixDEigen(const TMatrixDEigen &another);
46  virtual ~TMatrixDEigen() {}
47 
48 // If matrix A has shape (rowLwb,rowUpb,rowLwb,rowUpb), then each eigen-vector
49 // must have an index running between (rowLwb,rowUpb) .
50 // For convenience, the column index of the eigen-vector matrix
51 // also runs from rowLwb to rowUpb so that the returned matrix
52 // has also index/shape (rowLwb,rowUpb,rowLwb,rowUpb) .
53 // The same is true for the eigen-value vectors an matrix .
54 
55  const TMatrixD &GetEigenVectors () const { return fEigenVectors; }
56  const TVectorD &GetEigenValuesRe() const { return fEigenValuesRe; }
57  const TVectorD &GetEigenValuesIm() const { return fEigenValuesIm; }
58  const TMatrixD GetEigenValues () const;
59 
60  TMatrixDEigen &operator= (const TMatrixDEigen &source);
61 
62  ClassDef(TMatrixDEigen,1) // Eigen-Vectors/Values of a Matrix
63 };
64 #endif
e
#define e(i)
Definition: RSha256.hxx:103
H
#define H(x, y, z)
TVectorD.h
TMatrixDEigen::GetEigenVectors
const TMatrixD & GetEigenVectors() const
Definition: TMatrixDEigen.h:55
TMatrixDEigen::fEigenValuesRe
TVectorD fEigenValuesRe
Definition: TMatrixDEigen.h:35
TMatrixDEigen::GetEigenValuesIm
const TVectorD & GetEigenValuesIm() const
Definition: TMatrixDEigen.h:57
TMatrixDEigen::TMatrixDEigen
TMatrixDEigen()
Definition: TMatrixDEigen.h:42
TMatrixDEigen::MakeHessenBerg
static void MakeHessenBerg(TMatrixD &v, TVectorD &ortho, TMatrixD &H)
Nonsymmetric reduction to Hessenberg form.
Definition: TMatrixDEigen.cxx:109
TMatrixT< Double_t >
v
@ v
Definition: rootcling_impl.cxx:3664
TMatrixDEigen::fEigenValuesIm
TVectorD fEigenValuesIm
Definition: TMatrixDEigen.h:36
TMatrixDEigen
TMatrixDEigen.
Definition: TMatrixDEigen.h:27
TMatrixDEigen::~TMatrixDEigen
virtual ~TMatrixDEigen()
Definition: TMatrixDEigen.h:46
a
auto * a
Definition: textangle.C:12
TMatrixDEigen::GetEigenValues
const TMatrixD GetEigenValues() const
Computes the block diagonal eigenvalue matrix.
Definition: TMatrixDEigen.cxx:792
TMatrixDEigen::MakeSchurr
static void MakeSchurr(TMatrixD &v, TVectorD &d, TVectorD &e, TMatrixD &H)
Nonsymmetric reduction from Hessenberg to real Schur form.
Definition: TMatrixDEigen.cxx:234
TVectorT< Double_t >
TMatrixDEigen::GetEigenValuesRe
const TVectorD & GetEigenValuesRe() const
Definition: TMatrixDEigen.h:56
TMatrixDEigen::kWorkMax
@ kWorkMax
Definition: TMatrixDEigen.h:40
TMatrixDEigen::operator=
TMatrixDEigen & operator=(const TMatrixDEigen &source)
Assignment operator.
Definition: TMatrixDEigen.cxx:740
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMatrixDEigen::fEigenVectors
TMatrixD fEigenVectors
Definition: TMatrixDEigen.h:34
d
#define d(i)
Definition: RSha256.hxx:102
TMatrixDEigen::Sort
static void Sort(TMatrixD &v, TVectorD &d, TVectorD &e)
Sort eigenvalues and corresponding vectors in descending order of Re^2+Im^2 of the complex eigenvalue...
Definition: TMatrixDEigen.cxx:699
TMatrixD.h