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

lemur::api::ResultFile Class Reference

representation of result file More...

#include <ResultFile.hpp>

List of all members.

Public Member Functions

 ResultFile (bool TRECFormat=true)
 ~ResultFile ()
void openForRead (istream &is, Index &index)
 Open and associate an input stream for reading, e.g., with getResult function.

void load (istream &is, Index &index)
 Load all the results into an internal hash table, so as to allow random access to any of the results.

void getResult (const string &expectedQID, IndexedRealVector &res)
 Read the results for a given query from the associated input stream into memory (stored in res), sequential reading, so appropriate order must be maintained and attempting to get the results for a query that has no results will fail.

bool findResult (const string &queryID, IndexedRealVector *&res)
 Find the results for the given query id, the output variable res gets a pointer to the results, returns true iff found.

void openForWrite (ostream &os, Index &index)
 Associate an output stream for writing results.

void writeResults (const string &queryID, IndexedRealVector *results, int maxCountOfResult)
 writing the results (stored in results) into the associated output stream, up to a maximum count.


Private Member Functions

bool readLine ()

Private Attributes

bool trecFmt
string curQID
char curDID [300]
double curSC
Indexind
istream * inStr
ostream * outStr
bool eof
lemur::utility::ISet< lemur::utility::ResultEntry > * resTable


Detailed Description

representation of result file


Constructor & Destructor Documentation

lemur::api::ResultFile::ResultFile bool  TRECFormat = true  )  [inline]
 

lemur::api::ResultFile::~ResultFile  )  [inline]
 


Member Function Documentation

bool lemur::api::ResultFile::findResult const string &  queryID,
IndexedRealVector *&  res
 

Find the results for the given query id, the output variable res gets a pointer to the results, returns true iff found.

void lemur::api::ResultFile::getResult const string &  expectedQID,
IndexedRealVector res
 

Read the results for a given query from the associated input stream into memory (stored in res), sequential reading, so appropriate order must be maintained and attempting to get the results for a query that has no results will fail.

void lemur::api::ResultFile::load istream &  is,
Index index
 

Load all the results into an internal hash table, so as to allow random access to any of the results.

void lemur::api::ResultFile::openForRead istream &  is,
Index index
 

Open and associate an input stream for reading, e.g., with getResult function.

void lemur::api::ResultFile::openForWrite ostream &  os,
Index index
[inline]
 

Associate an output stream for writing results.

bool lemur::api::ResultFile::readLine  )  [private]
 

void lemur::api::ResultFile::writeResults const string &  queryID,
IndexedRealVector results,
int  maxCountOfResult
 

writing the results (stored in results) into the associated output stream, up to a maximum count.


Member Data Documentation

char lemur::api::ResultFile::curDID[300] [private]
 

string lemur::api::ResultFile::curQID [private]
 

double lemur::api::ResultFile::curSC [private]
 

bool lemur::api::ResultFile::eof [private]
 

Index* lemur::api::ResultFile::ind [private]
 

istream* lemur::api::ResultFile::inStr [private]
 

ostream* lemur::api::ResultFile::outStr [private]
 

lemur::utility::ISet<lemur::utility::ResultEntry>* lemur::api::ResultFile::resTable [private]
 

bool lemur::api::ResultFile::trecFmt [private]
 


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