![]() |
00001 #ifndef _BETA_DENSEMETRIC_ 00002 00003 #include <Eigen/Cholesky> 00004 00005 #include "dynamMetric.h" 00006 00012 00013 class denseFisherMetric: public dynamMetric 00014 { 00015 00016 public: 00017 00018 explicit denseFisherMetric(int dim); 00019 virtual ~denseFisherMetric() {}; 00020 00022 // Accessors // 00024 00025 double T(); 00026 double tau(); 00027 00028 void bounceP(const VectorXd& normal); 00029 00031 MatrixXd& G() { return mG; } 00032 00034 LLT<MatrixXd>& GL() { return mGL; } 00035 00037 // Mutators // 00039 00040 void sampleP(Random& random); 00041 00043 // Auxiliary Functions // 00045 00046 void checkEvolution(const double epsilon = 1e-6); 00047 00048 void displayState(); 00049 00050 void prepareEvolution() { fComputeCholeskyG(); } 00051 00052 protected: 00053 00054 MatrixXd mG; 00055 MatrixXd mGradG; 00056 LLT<MatrixXd> mGL; 00057 VectorXd mC; 00058 00059 void fComputeMetric() { fComputeCholeskyG(); } 00060 00062 virtual void fComputeG() = 0; 00063 00065 virtual void fComputeGradG(int i) = 0; 00066 00067 void fComputeCholeskyG(); 00068 00069 VectorXd& dTaudp(); 00070 VectorXd& dTaudq(); 00071 VectorXd& dPhidq(); 00072 00073 }; 00074 00075 #define _BETA_DENSEFISHERMETRIC_ 00076 #endif