#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 char *) |
to be implemented later. | |
Spelling and index conversion | |
virtual int | term (const char *word) |
Convert a term spelling to a termID. | |
virtual const char* | term (int termID) |
Convert a termID to its spelling. | |
virtual int | document (const char *docIDStr) |
Convert a spelling to docID. | |
virtual const char* | document (int docID) |
Convert a docID to its spelling. | |
virtual int | category (const char *catIDStr) |
Convert a spelling to catID. | |
virtual const char* | category (int catID) |
Convert a catID to its spelling. | |
Summary counts | |
virtual int | docCount () |
Total count (i.e., number) of documents in collection. | |
virtual int | termCountUnique () |
Total count of unique terms in collection. | |
virtual int | termCount (int termID)const |
Total counts of a term in collection. | |
virtual int | termCount ()const |
Total counts of all terms in collection. | |
virtual float | docLengthAvg () |
Average document length. | |
virtual int | docCount (int termID) |
Total counts of doc with a given term. | |
virtual int | docLength (int docID)const |
Total counts of terms in a document. | |
virtual int | catCount () |
Total counts of categories. | |
virtual int | docCountInCat (int catID) |
Total counts of documents in a category. | |
Base Index entry access (Term X Doc) | |
virtual DocInfoList* | docInfoList (int termID) |
doc entries in a term index,
| |
virtual TermInfoList* | termInfoList (int docID) |
word entries in a document index,
| |
Category Index entry access (Cat X Doc) | |
virtual void | startCatIDIteration (int docID) |
virtual bool | hasMoreCatID () |
virtual int | nextCatID () |
Iteration over all category ids that a doc belongs to. More... | |
virtual void | startDocIDIteration (int catID) |
virtual bool | hasMoreDocID () |
virtual int | nextDocID () |
Iteration over all doc ids that belong to a given category. More... |
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.
Reimplemented from IndexWithCat. |
|
Convert a catID to its spelling.
Reimplemented from IndexWithCat. |
|
Convert a spelling to catID.
Reimplemented from IndexWithCat. |
|
Total counts of doc with a given term.
Reimplemented from Index. |
|
Total count (i.e., number) of documents in collection.
Reimplemented from Index. |
|
Total counts of documents in a category.
Reimplemented from IndexWithCat. |
|
doc entries in a term index,
Reimplemented from Index. |
|
Total counts of terms in a document.
Reimplemented from Index. |
|
Average document length.
Reimplemented from Index. |
|
Convert a docID to its spelling.
Reimplemented from Index. |
|
Convert a spelling to docID.
Reimplemented from Index. |
|
Reimplemented from IndexWithCat. |
|
Reimplemented from 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 Reimplemented from 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 Reimplemented from IndexWithCat. |
|
to be implemented later.
Reimplemented from Index. |
|
Reimplemented from IndexWithCat. |
|
Reimplemented from IndexWithCat. |
|
Convert a termID to its spelling.
Reimplemented from Index. |
|
Convert a term spelling to a termID.
Reimplemented from Index. |
|
Total counts of all terms in collection.
Reimplemented from Index. |
|
Total counts of a term in collection.
Reimplemented from Index. |
|
Total count of unique terms in collection.
Reimplemented from Index. |
|
word entries in a document index,
Reimplemented from Index. |