Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

eigen_systems.h

Go to the documentation of this file.
00001 #ifndef __eigen_systems_h
00002 #define __eigen_systems_h
00003 
00004 #include "gslwrap/matrix_double.h"
00005 #include "gsl/gsl_eigen.h"
00006 
00007 namespace gsl
00008 {
00009 
00011 class real_eigenvectors
00012 {
00013  public:
00014         template <class MatrixType>
00015         real_eigenvectors(const MatrixType& covariancematrix) : 
00016                 eigenvectors(covariancematrix.get_rows(), covariancematrix.get_cols()),
00017                 eigenvalues(covariancematrix.get_rows())
00018                 {
00019                         gsl_eigen_symmv_workspace * work = gsl_eigen_symmv_alloc (covariancematrix.get_rows());
00020                         matrix s = covariancematrix;
00021                         gsl_eigen_symmv (s.gslobj(), eigenvalues.gslobj(), eigenvectors.gslobj(), work) ;
00022                         gsl_eigen_symmv_free (work);
00023                         gsl_eigen_symmv_sort (eigenvalues.gslobj(), eigenvectors.gslobj(), GSL_EIGEN_SORT_VAL_DESC) ;
00024                 }
00025         matrix eigenvectors;
00026         vector eigenvalues;
00027  private:
00028 };
00029 }
00030 #endif //__eigen_systems_h

Generated at Sun Dec 16 23:44:42 2001 for gslwrap by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001