X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=e8cc76a42879450f1695f08e6150088a0f8c3e38;hb=d1f17224ed40165c284145ffbfcc1bd42882f825;hp=ba01941218fbab46860efba61abd6a6d4b2c990d;hpb=1c3300373a43062be9bb8d23faf3c8446f9aa6c5;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index ba01941..e8cc76a 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -37,6 +37,8 @@ using SXSI::TextCollection; #define NULLT -1 +#define PERM_SAMPLE 10 + // sets bit p in e #define bitset(e,p) ((e)[(p)/W] |= (1<<((p)%W))) // cleans bit p in e @@ -67,7 +69,7 @@ class XMLTree { static_bitsequence_rrr02 *EBVector; /** Tag sequence represented with a data structure for rank and select */ - static_sequence_wvtree *Tags; + static_sequence *Tags; /** The texts in the XML document */ TextCollection *Text; @@ -85,6 +87,7 @@ class XMLTree { pb *par_aux; TagType *tags_aux; int npar; + int parArraySize; int ntagnames; unsigned int *empty_texts_aux; @@ -251,6 +254,10 @@ public: * Returns NULL in case that the tag identifier is not valid.*/ unsigned char *GetTagName(TagType tagid); + /** Prefix(s): search for texts prefixed by string s. */ + bool EmptyText(DocID i) { + return Text->EmptyText(i); + } /** Prefix(s): search for texts prefixed by string s. */ TextCollection::document_result Prefix(uchar const *s) { return Text->Prefix(s); @@ -336,6 +343,9 @@ public: return Text->GetText(d); } + TextCollection *getTextCollection() { + return Text; + } /** Save: saves XML tree data structure to file. */ void Save(unsigned char *filename);