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

InvTermList.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2001 Carnegie Mellon University.  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.cs.cmu.edu/~lemur/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 #ifndef _INVTERMLIST_HPP
00013 #define _INVTERMLIST_HPP
00014 
00015 #include "common_headers.hpp"
00016 #include "InvFPTerm.hpp"
00017 #include "InvFPTypes.hpp"
00018 
00019 
00027 class InvTermList : public TermInfoList {
00028 public:
00029   InvTermList();
00030   ~InvTermList();
00031 
00033   void startIteration();
00034 
00036   bool hasMore();
00037 
00039   TermInfo *nextEntry();
00040 
00042   int docLength(){ return length; }
00043 
00045   int termCount() { return listlen/2; }
00046 
00048   int docID() { return uid; }
00049 
00052   bool binRead(ifstream& infile);
00053 
00054 private:
00055 
00056   DOCID_T uid; // this doc's id
00057   int length;  // length of this document (terms + stopwords)
00058   int* list; // beginning of list of terms and counts
00059   int* end; // end of list
00060   int listlen; // number of terms in list
00061   int* iter;   // index for iterator
00062   InvFPTerm entry;
00063 };
00064 
00065 
00066 
00067 
00068 #endif

Generated on Fri Feb 6 07:11:47 2004 for LEMUR by doxygen1.2.16