00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INDRI_SCOREDEXTENTRESULT_HPP
00020 #define INDRI_SCOREDEXTENTRESULT_HPP
00021
00022 #include "lemur-platform.h"
00023
00024 struct ScoredExtentResult {
00025 struct score_greater {
00026 public:
00027 bool operator() ( const ScoredExtentResult& one, const ScoredExtentResult& two ) const {
00028 return one.score > two.score;
00029 }
00030 };
00031
00032 ScoredExtentResult() :
00033 score(0),
00034 document(0),
00035 begin(0),
00036 end(0)
00037 {
00038 }
00039
00040 ScoredExtentResult( UINT64 s, int d )
00041 :
00042 score( double(s) ),
00043 document(d),
00044 begin(0),
00045 end(0)
00046 {
00047 }
00048
00049 ScoredExtentResult( double s, int d )
00050 :
00051 score(s),
00052 document(d),
00053 begin(0),
00054 end(0)
00055 {
00056 }
00057
00058 ScoredExtentResult( double s, int d, int b, int e )
00059 :
00060 score(s),
00061 document(d),
00062 begin(b),
00063 end(e)
00064 {
00065 }
00066
00067 ScoredExtentResult( const ScoredExtentResult& other ) {
00068 score = other.score;
00069 document = other.document;
00070 begin = other.begin;
00071 end = other.end;
00072 }
00073
00074 bool operator< ( const ScoredExtentResult& other ) const {
00075 return score > other.score;
00076 }
00077
00078 double score;
00079 int document;
00080 int begin;
00081 int end;
00082 };
00083
00084 #endif // INDRI_SCOREDEXTENTRESULT_HPP
00085