///////////////////////////////////////////// // class Result // is part of BooleSuite 1.0 by Bob Marinier, marinier@cs.wisc.edu // see legal.lic for legal info // // Contains the score, name, and vote for a single bit column in the data ///////////////////////////////////////////// #if !defined(_RESULT_H_) #define _RESULT_H_ class Result { public: double score; //the score of this vote bool positiveState; //an active example will most likely have this state unsigned long bitNum; //the bit number of this result unsigned long name; //the actual bit number //The following is potentially needed by the STL to do proper sorting Result() : score(-1), positiveState(false), bitNum(0), name(0) { } Result(const Result& r) : score(r.score), positiveState(r.positiveState), bitNum(r.bitNum), name(r.name) { } void operator= (const Result& r) { score = r.score; positiveState = r.positiveState; bitNum = r.bitNum; name = r.name; } //Note that comparisons are done based on score bool operator< (const Result& r) const { return(score (const Result& r) const { return(score>r.score); } bool operator== (const Result& r) const { return(score==r.score); } bool operator!= (const Result& r) const { return(score!=r.score); } }; #endif