00001 00002 // Copyright (c) 2003, The Institute for Genomic Research (TIGR), Rockville, 00003 // Maryland, U.S.A. All rights reserved. 00005 #ifndef FEATVEC_H 00006 #define FEATVEC_H 00007 00008 #include "EvidenceType.h" 00009 #include <vector> 00010 00011 using std::vector; 00012 00020 class FeatVec : public vector<EvidenceType*> { 00021 public: 00026 FeatVec(int size) : vector<EvidenceType*>(size) { } 00027 FeatVec(const FeatVec&); 00028 00029 /* 00030 * calls delete for on each element 00031 */ 00032 ~FeatVec(); 00033 00037 void normalize(); 00038 00039 AnnotationScore sumEval() const; 00040 00044 int getNumDim() const; 00045 00049 float* toFloatArr(float*,unsigned) const; 00050 00055 void elem_normalize(); 00056 00061 void setVals(const FeatVec&); 00062 00066 std::ostream& val_print(std::ostream&) const; 00067 00072 friend double operator-(const FeatVec&, const FeatVec&); 00073 00074 void finish(); 00075 00076 }; 00077 #endif // FEATVEC_H