ROOT logo
// @(#)root/matrix:$Id: TMatrixDSymEigen.h 22428 2008-03-03 18:17:03Z brun $
// Authors: Fons Rademakers, Eddy Offermann   Dec 2003

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TMatrixDSymEigen
#define ROOT_TMatrixDSymEigen

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TMatrixDSymEigen                                                     //
//                                                                      //
// Eigenvalues and eigenvectors of a real symmetric matrix.             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TMatrixD
#include "TMatrixD.h"
#endif
#ifndef ROOT_TMatrixDSym
#include "TMatrixDSym.h"
#endif
#ifndef ROOT_TVectorD
#include "TVectorD.h"
#endif

class TMatrixDSymEigen
{
protected :

   static void MakeTridiagonal (TMatrixD &v,TVectorD &d,TVectorD &e);
   static void MakeEigenVectors(TMatrixD &v,TVectorD &d,TVectorD &e);

   TMatrixD fEigenVectors; // Eigen-vectors of matrix
   TVectorD fEigenValues;  // Eigen-values

public :

   enum {kWorkMax = 100}; // size of work array

   TMatrixDSymEigen() : fEigenVectors(), fEigenValues() {};
   TMatrixDSymEigen(const TMatrixDSym      &a);
   TMatrixDSymEigen(const TMatrixDSymEigen &another);
   virtual ~TMatrixDSymEigen() {}

// If matrix A has shape (rowLwb,rowUpb,rowLwb,rowUpb), then each eigen-vector
// must have an index running between (rowLwb,rowUpb) .
// For convenience, the column index of the eigen-vector matrix
// also runs from rowLwb to rowUpb so that the returned matrix
// has also index/shape (rowLwb,rowUpb,rowLwb,rowUpb) .
// The same is true for the eigen-value vector .

   const TMatrixD &GetEigenVectors() const { return fEigenVectors; }
   const TVectorD &GetEigenValues () const { return fEigenValues; }

   TMatrixDSymEigen &operator= (const TMatrixDSymEigen &source);

   ClassDef(TMatrixDSymEigen,1) // Eigen-Vectors/Values of a Matrix
};
#endif
 TMatrixDSymEigen.h:1
 TMatrixDSymEigen.h:2
 TMatrixDSymEigen.h:3
 TMatrixDSymEigen.h:4
 TMatrixDSymEigen.h:5
 TMatrixDSymEigen.h:6
 TMatrixDSymEigen.h:7
 TMatrixDSymEigen.h:8
 TMatrixDSymEigen.h:9
 TMatrixDSymEigen.h:10
 TMatrixDSymEigen.h:11
 TMatrixDSymEigen.h:12
 TMatrixDSymEigen.h:13
 TMatrixDSymEigen.h:14
 TMatrixDSymEigen.h:15
 TMatrixDSymEigen.h:16
 TMatrixDSymEigen.h:17
 TMatrixDSymEigen.h:18
 TMatrixDSymEigen.h:19
 TMatrixDSymEigen.h:20
 TMatrixDSymEigen.h:21
 TMatrixDSymEigen.h:22
 TMatrixDSymEigen.h:23
 TMatrixDSymEigen.h:24
 TMatrixDSymEigen.h:25
 TMatrixDSymEigen.h:26
 TMatrixDSymEigen.h:27
 TMatrixDSymEigen.h:28
 TMatrixDSymEigen.h:29
 TMatrixDSymEigen.h:30
 TMatrixDSymEigen.h:31
 TMatrixDSymEigen.h:32
 TMatrixDSymEigen.h:33
 TMatrixDSymEigen.h:34
 TMatrixDSymEigen.h:35
 TMatrixDSymEigen.h:36
 TMatrixDSymEigen.h:37
 TMatrixDSymEigen.h:38
 TMatrixDSymEigen.h:39
 TMatrixDSymEigen.h:40
 TMatrixDSymEigen.h:41
 TMatrixDSymEigen.h:42
 TMatrixDSymEigen.h:43
 TMatrixDSymEigen.h:44
 TMatrixDSymEigen.h:45
 TMatrixDSymEigen.h:46
 TMatrixDSymEigen.h:47
 TMatrixDSymEigen.h:48
 TMatrixDSymEigen.h:49
 TMatrixDSymEigen.h:50
 TMatrixDSymEigen.h:51
 TMatrixDSymEigen.h:52
 TMatrixDSymEigen.h:53
 TMatrixDSymEigen.h:54
 TMatrixDSymEigen.h:55
 TMatrixDSymEigen.h:56
 TMatrixDSymEigen.h:57
 TMatrixDSymEigen.h:58
 TMatrixDSymEigen.h:59
 TMatrixDSymEigen.h:60
 TMatrixDSymEigen.h:61
 TMatrixDSymEigen.h:62
 TMatrixDSymEigen.h:63
 TMatrixDSymEigen.h:64
 TMatrixDSymEigen.h:65
 TMatrixDSymEigen.h:66