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

lemur::index::InvFPTermList Class Reference

#include <InvFPTermList.hpp>

Inheritance diagram for lemur::index::InvFPTermList:

lemur::api::TermInfoList List of all members.

Public Member Functions

 InvFPTermList ()
 InvFPTermList (lemur::api::DOCID_T did, int len, vector< LocatedTerm > &tls)
 ~InvFPTermList ()
void startIteration () const
 prepare iteration

bool hasMore () const
 has more entries

lemur::api::TermInfonextEntry () const
 Get a pointer to the next entry (pointer to a local static memory).

virtual int size ()
 Gets the number of entries in this list.

virtual lemur::api::TermInfooperator[] (int index) const
lemur::api::COUNT_T docLength () const
 Get the length of this document.

lemur::api::COUNT_T termCount () const
 Get the number of terms in this document.

lemur::api::DOCID_T docID () const
 Get the docid this list is for.

bool binRead (ifstream &infile)
bool binReadC (ifstream &infile)
 Read in a compressed TermInfoList object from a file.

void binWriteC (ofstream &ofile)
 Write a compressed TermInfoList object to a file.

bool binReadC (lemur::file::File &infile)
void binWriteC (lemur::file::File &outfile)
virtual void deltaDecode ()
virtual void deltaEncode ()
void countTerms ()
 Change our default sequence of words representation to be bag of words.


Protected Member Functions

virtual lemur::api::TermInfonewElement () const
 create new element of this list type for the iterator

virtual lemur::api::TermInfogetElement (lemur::api::TermInfo *elem, lemur::api::POS_T position) const
 set element from position, returns pointer to the element

virtual void assignElement (lemur::api::TermInfo *to, lemur::api::TermInfo *from) const
 copy values from one Element (of type InvFPTerm) to another

virtual lemur::api::POS_T beginPosition () const
 position at beginning of list

virtual lemur::api::POS_T endPosition () const
 position at end of list

virtual lemur::api::POS_T nextPosition (lemur::api::POS_T position) const
 advance position


Protected Attributes

lemur::api::DOCID_T uid
lemur::api::COUNT_T length
LocatedTermlist
LLTermlistcounted
lemur::api::COUNT_T listlen
int index
lemur::api::LOC_Tcounts
InvFPTerm entry
vector< lemur::api::LOC_Tloclist

Detailed Description

This is a class that represents the term entries in doc index, to be used with InvFPIndex i.e., the ID and frequency of all terms in a document.


Constructor & Destructor Documentation

lemur::index::InvFPTermList::InvFPTermList  ) 
 

lemur::index::InvFPTermList::InvFPTermList lemur::api::DOCID_T  did,
int  len,
vector< LocatedTerm > &  tls
 

lemur::index::InvFPTermList::~InvFPTermList  ) 
 


Member Function Documentation

virtual void lemur::index::InvFPTermList::assignElement lemur::api::TermInfo to,
lemur::api::TermInfo from
const [inline, protected, virtual]
 

copy values from one Element (of type InvFPTerm) to another

Reimplemented from lemur::api::TermInfoList.

virtual lemur::api::POS_T lemur::index::InvFPTermList::beginPosition  )  const [inline, protected, virtual]
 

position at beginning of list

Implements lemur::api::TermInfoList.

bool lemur::index::InvFPTermList::binRead ifstream &  infile  ) 
 

Read in a TermInfoList object from a file Assumes the following format: DOCID DOCLENGTH UNIQUE_TERM_COUNT [TERM LOC]..[]

bool lemur::index::InvFPTermList::binReadC lemur::file::File infile  ) 
 

bool lemur::index::InvFPTermList::binReadC ifstream &  infile  ) 
 

Read in a compressed TermInfoList object from a file.

void lemur::index::InvFPTermList::binWriteC lemur::file::File outfile  ) 
 

void lemur::index::InvFPTermList::binWriteC ofstream &  ofile  ) 
 

Write a compressed TermInfoList object to a file.

void lemur::index::InvFPTermList::countTerms  ) 
 

Change our default sequence of words representation to be bag of words.

void lemur::index::InvFPTermList::deltaDecode  )  [virtual]
 

delta decode termids and positions from begin through end call after read

void lemur::index::InvFPTermList::deltaEncode  )  [virtual]
 

delta encode termids and positions from begin through end call before write

lemur::api::DOCID_T lemur::index::InvFPTermList::docID  )  const [inline]
 

Get the docid this list is for.

lemur::api::COUNT_T lemur::index::InvFPTermList::docLength  )  const [inline]
 

Get the length of this document.

virtual lemur::api::POS_T lemur::index::InvFPTermList::endPosition  )  const [inline, protected, virtual]
 

position at end of list

Implements lemur::api::TermInfoList.

lemur::api::TermInfo * lemur::index::InvFPTermList::getElement lemur::api::TermInfo elem,
lemur::api::POS_T  position
const [protected, virtual]
 

set element from position, returns pointer to the element

empty it!

Implements lemur::api::TermInfoList.

bool lemur::index::InvFPTermList::hasMore  )  const [virtual]
 

has more entries

Implements lemur::api::TermInfoList.

virtual lemur::api::TermInfo* lemur::index::InvFPTermList::newElement  )  const [inline, protected, virtual]
 

create new element of this list type for the iterator

Reimplemented from lemur::api::TermInfoList.

lemur::api::TermInfo * lemur::index::InvFPTermList::nextEntry  )  const [virtual]
 

Get a pointer to the next entry (pointer to a local static memory).

empty it!

Implements lemur::api::TermInfoList.

lemur::api::POS_T lemur::index::InvFPTermList::nextPosition lemur::api::POS_T  position  )  const [protected, virtual]
 

advance position

Implements lemur::api::TermInfoList.

lemur::api::TermInfo * lemur::index::InvFPTermList::operator[] int  index  )  const [virtual]
 

indexed access to the list. Also sets the iterator to the next item after or to the end if invalid.

Implements lemur::api::TermInfoList.

int lemur::index::InvFPTermList::size  )  [virtual]
 

Gets the number of entries in this list.

Implements lemur::api::TermInfoList.

void lemur::index::InvFPTermList::startIteration  )  const [virtual]
 

prepare iteration

Implements lemur::api::TermInfoList.

lemur::api::COUNT_T lemur::index::InvFPTermList::termCount  )  const [inline]
 

Get the number of terms in this document.


Member Data Documentation

lemur::api::LOC_T* lemur::index::InvFPTermList::counts [protected]
 

InvFPTerm lemur::index::InvFPTermList::entry [mutable, protected]
 

int lemur::index::InvFPTermList::index [mutable, protected]
 

lemur::api::COUNT_T lemur::index::InvFPTermList::length [protected]
 

LocatedTerm* lemur::index::InvFPTermList::list [protected]
 

LLTerm* lemur::index::InvFPTermList::listcounted [protected]
 

lemur::api::COUNT_T lemur::index::InvFPTermList::listlen [protected]
 

vector<lemur::api::LOC_T> lemur::index::InvFPTermList::loclist [mutable, protected]
 

lemur::api::DOCID_T lemur::index::InvFPTermList::uid [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4