TMatrixDEigen.h

Go to the documentation of this file.
00001 // @(#)root/matrix:$Id: TMatrixDEigen.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Authors: Fons Rademakers, Eddy Offermann   Dec 2003
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TMatrixDEigen
00013 #define ROOT_TMatrixDEigen
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TMatrixDEigen                                                        //
00018 //                                                                      //
00019 // Eigenvalues and eigenvectors of a real matrix.                       //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TMatrixD
00024 #include "TMatrixD.h"
00025 #endif
00026 #ifndef ROOT_TVectorD
00027 #include "TVectorD.h"
00028 #endif
00029 
00030 class TMatrixDEigen
00031 {
00032 protected :
00033 
00034    static void MakeHessenBerg  (TMatrixD &v,TVectorD &ortho,TMatrixD &H);
00035    static void MakeSchurr      (TMatrixD &v,TVectorD &d,    TVectorD &e,TMatrixD &H);
00036    static void Sort            (TMatrixD &v,TVectorD &d,    TVectorD &e);
00037 
00038    TMatrixD fEigenVectors;   // Eigen-vectors of matrix
00039    TVectorD fEigenValuesRe;  // Eigen-values
00040    TVectorD fEigenValuesIm;  // Eigen-values
00041 
00042 public :
00043 
00044    enum {kWorkMax = 100}; // size of work array
00045 
00046    TMatrixDEigen() 
00047      : fEigenVectors(), fEigenValuesRe(), fEigenValuesIm() {};
00048    TMatrixDEigen(const TMatrixD &a);
00049    TMatrixDEigen(const TMatrixDEigen &another);
00050    virtual ~TMatrixDEigen() {}
00051 
00052 // If matrix A has shape (rowLwb,rowUpb,rowLwb,rowUpb), then each eigen-vector
00053 // must have an index running between (rowLwb,rowUpb) .
00054 // For convenience, the column index of the eigen-vector matrix
00055 // also runs from rowLwb to rowUpb so that the returned matrix
00056 // has also index/shape (rowLwb,rowUpb,rowLwb,rowUpb) .
00057 // The same is true for the eigen-value vectors an matrix .
00058 
00059    const TMatrixD &GetEigenVectors () const { return fEigenVectors;  }
00060    const TVectorD &GetEigenValuesRe() const { return fEigenValuesRe; }
00061    const TVectorD &GetEigenValuesIm() const { return fEigenValuesIm; }
00062    const TMatrixD  GetEigenValues  () const;
00063 
00064    TMatrixDEigen &operator= (const TMatrixDEigen &source);
00065 
00066    ClassDef(TMatrixDEigen,1) // Eigen-Vectors/Values of a Matrix
00067 };
00068 #endif

Generated on Tue Jul 5 14:27:02 2011 for ROOT_528-00b_version by  doxygen 1.5.1