Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

QuidResult.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Trec_QuidResult_h
00002 #define Impala_Core_Trec_QuidResult_h
00003 
00004 namespace Impala {
00005 namespace Core {
00006 namespace Trec {
00007 
00008 class QuidResult
00009 {
00010     friend std::ostream &operator<<(std::ostream &output, const QuidResult &tr) {
00011         output << QuidObj(tr.quid) << " (" << tr.score << ", " << tr.rank << ")";
00012         return output;
00013     }
00014 
00015 public:
00016     Quid quid;
00017     int rank;
00018     Real64 score;
00019 
00020     QuidResult() {
00021         quid = 0;
00022         rank = 0;
00023         score = 0.0;
00024     }
00025 
00026     QuidResult(const QuidResult &copy) {
00027         quid = copy.quid;
00028         rank = copy.rank;
00029         score = copy.score;
00030     }
00031 
00032     ~QuidResult() {
00033 
00034     }
00035 
00036     QuidResult &operator=(const QuidResult &o) {
00037         this->quid = o.quid;
00038         this->rank = o.rank;
00039         this->score = o.score;
00040         return *this;
00041     }
00042 
00043     int operator==(const QuidResult &o) {
00044         if (this->quid == o.quid && this->quid != 0)
00045             return 1;
00046         return 0;
00047     }
00048 
00049     int operator<(const QuidResult &o) {
00050         return this->quid < o.quid;
00051     }
00052 };
00053 
00054 } // Trec
00055 } // Core
00056 } // Impala
00057 
00058 #endif

Generated on Fri Mar 19 09:31:26 2010 for ImpalaSrc by  doxygen 1.5.1