openModeller
Version 1.4.0
|
00001 00036 #ifndef _RULESET_HH_ 00037 #define _RULESET_HH_ 00038 00039 #include <openmodeller/om.hh> 00040 #include "rules_base.hh" 00041 00042 00043 /****************************************************************/ 00044 /************************** GARP Rule-Set ***********************/ 00045 00046 class GarpRule; 00047 00053 class GarpRuleSet 00054 { 00055 public: 00060 GarpRuleSet(int size); 00061 00062 ~GarpRuleSet(); 00063 00067 int size(); 00068 00069 00072 int numRules(); 00073 00074 00077 void clear(); 00078 00079 00086 void trim(int rules); 00087 00088 00098 void filter(PerfIndex perfIndex, double threshold); 00099 00100 00106 GarpRule * get(int index); 00107 00108 00119 int insert(PerfIndex perfIndex, GarpRule * rule); 00120 00121 00132 int replace(int index, GarpRule * rule); 00133 00138 int remove(int index); 00139 00147 int add(GarpRule * rule); 00148 00149 00159 int findSimilar(GarpRule * rule); 00160 00161 00165 Scalar getValue( const Sample& x ) const; 00166 00167 00174 void performanceSummary(PerfIndex perfIndex, 00175 double * best, double * worst, double * average); 00176 00177 00178 void gatherRuleSetStats(int gen); 00179 void log() const; 00180 00181 00182 private: 00183 GarpRule ** _rules; 00184 int _size; 00185 int _numRules; 00186 }; 00187 00188 // ==================================================================== 00189 00190 #endif