Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ListAccumulator.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 // ListAccumulator
00015 //
00016 // 11 April 2006 -- tds
00017 //
00018 
00019 #ifndef INDRI_LISTACCUMULATOR_HPP
00020 #define INDRI_LISTACCUMULATOR_HPP
00021 
00022 #include "indri/ListIteratorNode.hpp"
00023 #include "lemur-platform.h"
00024 #include "lemur-compat.hpp"
00025 #include <vector>
00026 #include "indri/EvaluatorNode.hpp"
00027 #include "indri/QuerySpec.hpp"
00028 #include "indri/DocumentCount.hpp"
00029 #include "indri/ScoredExtentResult.hpp"
00030 
00031 namespace indri
00032 {
00033   namespace infnet
00034   {
00035     class ListAccumulator : public EvaluatorNode {
00036     private:
00037       // The accumulator records all extents from the node _counted.
00038       ListIteratorNode& _counted;
00039       std::string _name;
00040 
00041       EvaluatorNode::MResults _results;
00042       std::vector<indri::api::ScoredExtentResult>* _resultVector;
00043 
00044     public:
00045       ListAccumulator( const std::string& name, ListIteratorNode& counted );
00046       ~ListAccumulator();
00047 
00048       const ListIteratorNode* getCountedNode() const;
00049       const EvaluatorNode::MResults& getResults();
00050 
00051       const std::string& getName() const;
00052       void evaluate( lemur::api::DOCID_T documentID, int documentLength );
00053       lemur::api::DOCID_T nextCandidateDocument();
00054       void indexChanged( indri::index::Index& index );
00055     };
00056   }
00057 }
00058 
00059 #endif // INDRI_LISTACCUMULATOR_HPP
00060 

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4