HMSBEAGLE
1.0.0
|
00001 /* 00002 * EigenDecompositionSquare.h 00003 * 00004 * Created on: Sep 24, 2009 00005 * Author: msuchard 00006 */ 00007 00008 #ifndef EIGENDECOMPOSITIONSQUARE_H_ 00009 #define EIGENDECOMPOSITIONSQUARE_H_ 00010 00011 #include "EigenDecomposition.h" 00012 00013 namespace beagle { 00014 namespace cpu { 00015 00016 BEAGLE_CPU_EIGEN_TEMPLATE 00017 class EigenDecompositionSquare: public EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC> { 00018 00019 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::gEigenValues; 00020 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::kStateCount; 00021 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::kEigenDecompCount; 00022 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::kCategoryCount; 00023 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::matrixTmp; 00024 using EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC>::kFlags; 00025 00026 protected: 00027 REALTYPE** gEMatrices; // kStateCount^2 flattened array 00028 REALTYPE** gIMatrices; // kStateCount^2 flattened array 00029 bool isComplex; 00030 int kEigenValuesSize; 00031 00032 public: 00033 EigenDecompositionSquare(int decompositionCount, 00034 int stateCount, 00035 int categoryCount, 00036 long flags); 00037 00038 virtual ~EigenDecompositionSquare(); 00039 00040 virtual void setEigenDecomposition(int eigenIndex, 00041 const double* inEigenVectors, 00042 const double* inInverseEigenVectors, 00043 const double* inEigenValues); 00044 00045 virtual void updateTransitionMatrices(int eigenIndex, 00046 const int* probabilityIndices, 00047 const int* firstDerivativeIndices, 00048 const int* secondDerivativeIndices, 00049 const double* edgeLengths, 00050 const double* categoryRates, 00051 REALTYPE** transitionMatrices, 00052 int count); 00053 }; 00054 00055 } 00056 } 00057 00058 // Include the template implementation header 00059 #include "libhmsbeagle/CPU/EigenDecompositionSquare.hpp" 00060 00061 #endif /* EIGENDECOMPOSITIONSQUARE_H_ */