psycho-skin-accuracyEstimator.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _PSYCHO_SKIN_ACCURACYESTIMATOR_H_
00013 #define _PSYCHO_SKIN_ACCURACYESTIMATOR_H_
00014 #include <map>
00015 #include <string>
00016
00017
00018 class IntString{
00019
00020 public :
00021 IntString(int* mem , int s) ;
00022 ~IntString() ;
00023 int getDegree() ;
00024 int size() ;
00025 int getElementAt(int i) ;
00026 std::string toString();
00027 void set(int pos , int val) ;
00028
00029
00030 private :
00031 std::string stringify(int i) ;
00032 int * mems ;
00033 int theSize ;
00034 int degree ;
00035 } ;
00036
00037 IntString* getTPS(IntString& testIntStr , IntString& repIntStr);
00038
00039 std::map<float,float>* getProbabilityDistribution(IntString& tstIntStr , IntString& repIntStr) ;
00040
00041 std::map<float,float>* getCummulativeProbabilityDistribution(IntString& tstIntStr , IntString& repIntStr) ;
00042
00043 float getExpectedValue(std::map<float , float>& dist) ;
00044
00045 float getSTD(std::map<float , float>& dist) ;
00046
00047 float getAccuracyOfPPS(int d , int p , int n) ;
00048
00049 int getBinomialCoef(int n , int r) ;
00050
00051 void normalizeThePDF(std::map<float,float>& pdf);
00052
00053 int factorial(int n);
00054
00055 #endif
00056