00001
00002
00003
00005 #ifndef CUSTOM7_H
00006 #define CUSTOM7_H
00007
00008 #include "CustomScore.h"
00009 #include "DataDescrip.h"
00010 #include "dtree.h"
00011 class RegionPrediction;
00012
00013 class Custom7 : public CustomScore {
00014 public:
00015 Custom7() : CustomScore(EvScores::eNumBnd), _dTree(EvScores::eNumBnd) { }
00016 void createTree(const string&);
00017 static void readDiscreteVals(const string&);
00018 static void newInstance() {
00019 assert(!Custom7::_instance);
00020 Custom7::_instance = new Custom7();
00021 }
00022 static Custom7* getInstance() {
00023 assert(Custom7::_instance);
00024 return Custom7::_instance;
00025 }
00026 static void deleteInstance() {
00027 assert(Custom7::_instance);
00028 delete Custom7::_instance;
00029 }
00030 CustomScore::LabelScore score(const RegionPrediction&, const string&) const;
00031 void score(vector<RegionPrediction*>&, const string&) const;
00032
00033 double getProb(const AnnotationItem&, EvScores::Bnd_t, dsu::Strand_t) const;
00034
00035 protected:
00036 ~Custom7() {
00037 for(unsigned i = 0; i < _dTree.size(); ++i) {
00038 delete _dTree[i];
00039 }
00040 }
00041 EvScores scoreHelp(const vector<RegionPrediction*>&, const string&, dsu::Strand_t) const;
00042
00043
00044 private:
00045 vector<DTree*> _dTree;
00046
00047 private:
00048 static Custom7 * _instance;
00049 };
00050
00051 #endif //CUSTOM7_H