00001 #ifndef TPP_H_ 00002 #define TPP_H_ 00003 00004 #include <iostream> 00005 #include <fstream> 00006 #include <cmath> 00007 00008 #include <Matrix.h> 00009 00010 00012 class TPP 00013 { 00014 00015 public: 00016 00022 TPP(double ** data=0, int individuals=0, int landmarks=0, int dimensions=0); 00023 00025 virtual ~TPP(); 00026 00032 void LoadData(double ** data, int individuals, int landmarks, int dimensions); 00033 00036 int GetNumberOfSpecimens() 00037 { 00038 return m_individuals; 00039 } 00040 00043 int GetNumberOfLandmarks() 00044 { 00045 return m_landmarks; 00046 } 00047 00050 int GetNumberOfDimensions() 00051 { 00052 return m_dimensions; 00053 } 00054 00057 void GetProjectedData(double ** projData); 00058 00060 void PerformTPP(); 00061 00065 void InverseTPP(double *tanEshape, double *result[]); 00066 00069 bool IsCalculated() 00070 { 00071 return m_calculated; 00072 } 00073 00074 private: 00075 00076 Matrix<double> m_mean; 00077 Matrix<double> m_data; 00078 Matrix<double> m_projectedData; 00079 int m_individuals; 00080 int m_landmarks; 00081 int m_dimensions; 00082 bool m_calculated; 00083 }; 00084 00085 #endif // TPP_H_