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

InvFPTerm.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.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 #ifndef _INVFPTERM_HPP
00013 #define _INVFPTERM_HPP
00014 
00015 #include "TermInfoList.hpp"
00016 #include "Term.hpp"
00017 #include "InvFPTypes.hpp"
00018 
00019 namespace lemur 
00020 {
00021   namespace index 
00022   {
00023     
00025 
00028     class InvFPTerm: public lemur::api::TermInfo, public lemur::api::Term {
00029     public:
00030       InvFPTerm() { tcount=1;}
00031       ~InvFPTerm() {};
00032 
00033       int strLength() const { return strlen; }
00034       void strLength(int len) { strlen = len; }
00035       lemur::api::LOC_T position() const { return loc; }
00036       const lemur::api::LOC_T* positions() const {vector<lemur::api::LOC_T>::const_iterator it(loclist->begin()); return &(*it); }
00037       void position(lemur::api::LOC_T pos) { loc = pos; }
00038       void positions(vector<lemur::api::LOC_T>* list) { loclist = list; }
00039     protected:
00040       int strlen;
00041       lemur::api::LOC_T loc;  // where this term (currently) occurs in the document
00042       vector<lemur::api::LOC_T>* loclist; // list of all places term occurs in the document                  
00043     };
00044   }
00045 }
00046 
00047 #endif

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