X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=7407014e7bd17c0870ad9eee0e43e1d0db3eb6bd;hb=60f0f1a447b2b89ca99589c68333d72bcdeb263d;hp=9b55617e0105add000a39428462ce4958b59b1df;hpb=3c2f48fd3166bb5b65594012d6cc9b0236c390f9;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index 9b55617..7407014 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -21,16 +21,15 @@ #ifndef XMLTREE_H_ #define XMLTREE_H_ - +#include "TextCollection/TextCollection.h" #include #include +#include #include "bp.h" -#include "TextCollection/TextCollection.h" -using SXSI::TextCollection; #include #include #include - +using SXSI::TextCollection; // this constant is used to efficiently compute the child operation in the tree @@ -38,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 @@ -68,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; @@ -86,6 +87,7 @@ class XMLTree { pb *par_aux; TagType *tags_aux; int npar; + int parArraySize; int ntagnames; unsigned int *empty_texts_aux; @@ -334,9 +336,12 @@ public: /** GetText(d): returns the text corresponding to document with * id d. */ uchar* GetText(DocID d) { - Text->GetText(d); + return Text->GetText(d); } + TextCollection *getTextCollection() { + return Text; + } /** Save: saves XML tree data structure to file. */ void Save(unsigned char *filename);