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

PriorListIterator.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2005 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 // PriorListIterator.hpp
00014 //
00015 // 22 July 2005 -- tds
00016 //
00017 
00018 #ifndef INDRI_PRIORLISTITERATOR_HPP
00019 #define INDRI_PRIORLISTITERATOR_HPP
00020 
00021 #include "indri/SequentialReadBuffer.hpp"
00022 #include "indri/greedy_vector"
00023 #include "IndexTypes.hpp"
00024 
00025 namespace indri {
00026   namespace collection {
00027     class PriorListIterator {
00028     public:
00029       struct Entry {
00030         lemur::api::DOCID_T document;
00031         double score;
00032       };
00033     
00034     private:
00035       indri::file::SequentialReadBuffer* _file;
00036       Entry _entry;
00037       indri::utility::greedy_vector<double> _lookup;
00038       
00039       bool _finished;
00040       UINT32 _entryCount;
00041       UINT32 _entryLength;
00042       UINT32 _tableLength;
00043       
00044     public:
00045       PriorListIterator( indri::file::SequentialReadBuffer* file );
00046       ~PriorListIterator();
00047     
00048       void startIteration();
00049       void nextEntry();
00050       void nextEntry( lemur::api::DOCID_T document );
00051       Entry* currentEntry();
00052       bool finished();
00053     };
00054   }
00055 }
00056 
00057 #endif // INDRI_PRIORLISTITERATOR_HPP

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