HMSBEAGLE  1.0.0
EigenDecompositionSquare.h
1 /*
2  * EigenDecompositionSquare.h
3  *
4  * Created on: Sep 24, 2009
5  * Author: msuchard
6  */
7 
8 #ifndef EIGENDECOMPOSITIONSQUARE_H_
9 #define EIGENDECOMPOSITIONSQUARE_H_
10 
11 #include "EigenDecomposition.h"
12 
13 namespace beagle {
14 namespace cpu {
15 
16 BEAGLE_CPU_EIGEN_TEMPLATE
17 class EigenDecompositionSquare: public EigenDecomposition<BEAGLE_CPU_EIGEN_GENERIC> {
18 
25 
26 protected:
27  REALTYPE** gEMatrices; // kStateCount^2 flattened array
28  REALTYPE** gIMatrices; // kStateCount^2 flattened array
29  bool isComplex;
30  int kEigenValuesSize;
31 
32 public:
33  EigenDecompositionSquare(int decompositionCount,
34  int stateCount,
35  int categoryCount,
36  long flags);
37 
38  virtual ~EigenDecompositionSquare();
39 
40  virtual void setEigenDecomposition(int eigenIndex,
41  const double* inEigenVectors,
42  const double* inInverseEigenVectors,
43  const double* inEigenValues);
44 
45  virtual void updateTransitionMatrices(int eigenIndex,
46  const int* probabilityIndices,
47  const int* firstDerivativeIndices,
48  const int* secondDerivativeIndices,
49  const double* edgeLengths,
50  const double* categoryRates,
51  REALTYPE** transitionMatrices,
52  int count);
53 };
54 
55 }
56 }
57 
58 // Include the template implementation header
59 #include "libhmsbeagle/CPU/EigenDecompositionSquare.hpp"
60 
61 #endif /* EIGENDECOMPOSITIONSQUARE_H_ */