#include <BasicIndexWithCat.hpp>
Inheritance diagram for BasicIndexWithCat:
Public Methods | |
BasicIndexWithCat (Index &wordIndex, Index &categoryIndex, bool catIsTerm=true) | |
opens the indices. catIsTerm indicates whether a category is actually indexed as a "term" or a "document" in categoryIndex. | |
~BasicIndexWithCat () | |
bool | open (const string &name) |
to be implemented later | |
Spelling and index conversion | |
virtual TERMID_T | term (const string &word) const |
Convert a term spelling to a termID. | |
virtual const string | term (TERMID_T termID) const |
Convert a termID to its spelling. | |
virtual DOCID_T | document (const string &docIDStr) const |
Convert a spelling to docID. | |
virtual const string | document (DOCID_T docID) const |
Convert a docID to its spelling. | |
virtual int | category (const string &catIDStr) const |
Convert a spelling to catID. | |
virtual const string | category (int catID) const |
Convert a catID to its spelling. | |
Summary counts | |
virtual COUNT_T | docCount () const |
Total count (i.e., number) of documents in collection. | |
virtual COUNT_T | termCountUnique () const |
Total count of unique terms in collection. | |
virtual COUNT_T | termCount (TERMID_T termID) const |
Total counts of a term in collection. | |
virtual COUNT_T | termCount () const |
Total counts of all terms in collection. | |
virtual float | docLengthAvg () const |
Average document length. | |
virtual COUNT_T | docCount (TERMID_T termID) const |
Total counts of doc with a given term. | |
virtual COUNT_T | docLength (DOCID_T docID) const |
Total counts of terms in a document. | |
virtual int | catCount () const |
Total counts of categories. | |
virtual int | docCountInCat (int catID) const |
Total counts of documents in a category. | |
Base Index entry access (Term X Doc) | |
virtual DocInfoList * | docInfoList (TERMID_T termID) const |
doc entries in a term index,
| |
virtual TermInfoList * | termInfoList (DOCID_T docID) const |
word entries in a document index,
| |
Category Index entry access (Cat X Doc) | |
virtual void | startCatIDIteration (int docID) const |
virtual bool | hasMoreCatID () const |
virtual int | nextCatID () const |
Iteration over all category ids that a doc belongs to. | |
virtual void | startDocIDIteration (int catID) const |
virtual bool | hasMoreDocID () const |
virtual int | nextDocID () const |
Iteration over all doc ids that belong to a given category. |
BasicIndexWithCat is a wrapper that manages two separate Index's: one for word X doc index and one for category X doc index. It synchronizes the document index in both indices.
|
opens the indices. catIsTerm indicates whether a category is actually indexed as a "term" or a "document" in categoryIndex.
|
|
|
|
Total counts of categories.
Implements IndexWithCat. |
|
Convert a catID to its spelling.
Implements IndexWithCat. |
|
Convert a spelling to catID.
Implements IndexWithCat. |
|
Total counts of doc with a given term.
Implements Index. |
|
Total count (i.e., number) of documents in collection.
Implements Index. |
|
Total counts of documents in a category.
Implements IndexWithCat. |
|
doc entries in a term index,
Implements Index. |
|
Total counts of terms in a document.
Implements Index. |
|
Average document length.
Implements Index. |
|
Convert a docID to its spelling.
Implements Index. |
|
Convert a spelling to docID.
|
|
Implements IndexWithCat. |
|
Implements IndexWithCat. |
|
Iteration over all category ids that a doc belongs to. startCatIDIteration, hasMoreCatID, and nextCatID go together to support iteration over category ids that a document has Implements IndexWithCat. |
|
Iteration over all doc ids that belong to a given category. startDocIDIteration, hasMoreDocID, and nextDocID go together to support iteration over all doc ids in a given category Implements IndexWithCat. |
|
to be implemented later
Implements Index. |
|
Implements IndexWithCat. |
|
Implements IndexWithCat. |
|
Convert a termID to its spelling.
Implements Index. |
|
Convert a term spelling to a termID.
|
|
Total counts of all terms in collection.
Implements Index. |
|
Total counts of a term in collection.
Implements Index. |
|
Total count of unique terms in collection.
Implements Index. |
|
word entries in a document index,
Implements Index. |