X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=TextCollection.h;h=37d5cb5ab37edb66a39e5ed8c4a36026b322cc8c;hb=7eaf8bbcb18ab4a481905d219ab0b9e8286c75b2;hp=e7f0d4bb17de878d0d028c29d62b5b41ae50bad7;hpb=ccc18959e93d8986c0ce81209865a0a2b5f42be6;p=SXSI%2FTextCollection.git diff --git a/TextCollection.h b/TextCollection.h index e7f0d4b..37d5cb5 100644 --- a/TextCollection.h +++ b/TextCollection.h @@ -86,7 +86,13 @@ namespace SXSI * New texts can not be inserted after this operation. */ virtual void MakeStatic() = 0; - + + /** + tests if the string pointed to by DocId is empty + */ + + virtual bool EmptyText(DocId) const = 0; + /** * Displaying content * @@ -99,13 +105,13 @@ namespace SXSI * * Note: Parameters i and j are text positions inside the k'th text. */ - virtual uchar* GetText(DocId, TextPosition, TextPosition) const = 0; +// virtual uchar* GetText(DocId, TextPosition, TextPosition) const = 0; /** * Returns backwards (reverse) iterator to the end of i'th text * * Note: Do we need this? * Forward iterator would be really in-efficient compared to - * getText(k) and getText(k, i, j). + * getText(k). * * TODO Define and implement const_reverse_iterator. */ @@ -126,8 +132,12 @@ namespace SXSI virtual bool IsLessThan(uchar const *) const = 0; /** - * Counting queries - * + * Counting queries + * Result is the number of occurrences. + */ + virtual ulong Count(uchar const *) const = 0; + /** + * More counting queries * Result is the number of documents. */ virtual unsigned CountPrefix(uchar const *) const = 0;