Access a word index file in a filtered manner. More...
#include <WordSubIndex.h>
Public Member Functions | |
WordSubIndex (BlockStats *stats) | |
Initialise the SubIndex. | |
void | buildWordList (void) |
Read the word statistics from the stats file. | |
void | buildDocumentList (void) |
Read the document statistics from the stats file. | |
int | wordCount (void) |
Return the real number of words. | |
int | documentCount (void) |
Return the real number of documents. | |
Word * | wordStats (int word) |
Return the Word statistics for the word with sub-id 'word'. | |
Document * | documentStats (int document) |
Return the Document statistics for the document with sub-id 'document'. | |
void | generateIndexList (int minDocumentCount, int maxDocumentCount) |
Compute the list of words and documents in the SubIndex. | |
void | generateIndexList (Word **queryTerms, int uniqueQueryTerms) |
Compute the list of words and documents in the SubIndex. | |
void | hashHack (void) |
int | elementDocumentCount (int i) |
Return the number of documents word i of the SubIndex is in. | |
FILE_POS_TYPE | elementFilePosition (int i) |
Return the index file position of word i in the SubIndex. | |
Word * | indexStats (int word) |
Return the stats of word i in the SubIndex. | |
int | indexElements (int i) |
Return the stats of document i in the SubIndex. | |
int | indexLength (void) |
Return the number of words in the SubIndex. | |
int | rowLength (void) |
Return the number of documents in the SubIndex. | |
Protected Attributes | |
ElementList< Word > * | _wordList |
The stats list for all words. | |
DocumentList * | _documentList |
The stats list for all documents. | |
BlockStats * | _stats |
The stats list the blocks. |
Access a word index file in a filtered manner.
This class provides an interface to access certain elements of a word index file (indexed according to words) as if they were all of the elements in the file. This means that other classes do not have to compute while elements to select, since they are selected at this level.