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

ResultFile Class Reference

representation of result file More...

#include <ResultFile.hpp>

List of all members.

Public Methods

 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 (char *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 (char *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 (char *queryID, IndexedRealVector *results, int maxCountOfResult)
 writing the results (stored in results) into the associated output stream, up to a maximum count.


Private Methods

bool readLine ()

Private Attributes

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


Detailed Description

representation of result file


Constructor & Destructor Documentation

ResultFile::ResultFile bool    TRECFormat = true [inline]
 

ResultFile::~ResultFile   [inline]
 


Member Function Documentation

bool ResultFile::findResult char *    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 ResultFile::getResult char *    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 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 ResultFile::openForRead istream &    is,
Index   index
 

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

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

Associate an output stream for writing results.

bool ResultFile::readLine   [private]
 

void ResultFile::writeResults char *    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 ResultFile::curDID[300] [private]
 

char ResultFile::curQID[300] [private]
 

double ResultFile::curSC [private]
 

bool ResultFile::eof [private]
 

Index* ResultFile::ind [private]
 

istream* ResultFile::inStr [private]
 

ostream* ResultFile::outStr [private]
 

ISet<ResultEntry>* ResultFile::resTable [private]
 

bool ResultFile::trecFmt [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 6 07:12:06 2004 for LEMUR by doxygen1.2.16