- // Map from end-marker in BWT to pair (textId, sampled text position)
- std::map<TextPosition, std::pair<DocId, TextPosition> > endmarkers;
- // Vector of pairs of <text length, text start position>
- std::vector<std::pair<TextPosition, TextPosition> > textLength;
-
+
+ // Total number of texts in the collection
+ unsigned numberOfTexts;
+ // Total number of texts including empty texts
+ unsigned numberOfAllTexts;
+ // Length of the longest text
+ ulong maxTextLength;
+
+ // Array of document id's in the order of end-markers in BWT
+ // Access by endmarkerDocId[rank_$(L, p) - 1].
+ BlockArray *endmarkerDocId;
+ // Array of text lengths (in the inserted order)
+ BlockArray *textLength;
+ // Array of text starting positions (in the inserted order)
+ BlockArray *textStartPos;
+
+ // FIXME Replace with a more succinct data structure
+ std::set<unsigned> emptyTextId;
+ BSGAP *emptyTextRank;
+