Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ScoredExtentResult.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 //
00014 // ScoredExtentResult
00015 //
00016 // 8 March 2004 -- tds
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 

Generated on Wed Nov 3 12:59:03 2004 for Lemur Toolkit by doxygen1.2.18