Fix a few missing std::string (du to removal of using namespace std in libcds)
[SXSI/TextCollection.git] / TCImplementation.h
index 75f1d40..ff5f713 100644 (file)
@@ -20,6 +20,9 @@
 
 #ifndef _TCImplementation_H_
 #define _TCImplementation_H_
+
+#include "incbwt/bits/deltavector.h"
+
 #include "BitRank.h"
 #include "TextCollection.h"
 #include "BlockArray.h"
 #undef bitset
 #undef bitget
 
+
 #include "TextStorage.h"
+#include "ArrayDoc.h"
 #include <set>
+#include <string>
 
 namespace SXSI 
 {
@@ -54,7 +60,8 @@ namespace SXSI
  */
 class TCImplementation : public SXSI::TextCollection {
 public:
-    TCImplementation(uchar *, ulong, unsigned, unsigned, ulong, ulong, char);
+    TCImplementation(uchar *, ulong, unsigned, unsigned, ulong, ulong, 
+                     CSA::DeltaVector &, const std::string &, char);
     ~TCImplementation();
 
     bool EmptyText(DocId) const;
@@ -157,7 +164,8 @@ private:
     ulong maxTextLength;
 
     // Array of document id's in the order of end-markers in BWT
-    static_sequence *Doc;
+//    static_sequence *Doc;
+    ArrayDoc *Doc;
 
     // Text storage for fast extraction
     TextStorage * textStorage;
@@ -165,7 +173,7 @@ private:
     // Following methods are not part of the public API
     uchar * BWT(uchar *);
     void makewavelet(uchar *);
-    void maketables(ulong, char);
+    void maketables(ulong, char, CSA::DeltaVector &, const std::string &);
     DocId DocIdAtTextPos(BlockArray*, TextPosition) const;
     ulong Search(uchar const *, TextPosition, TextPosition *, TextPosition *) const;
     ulong Search(uchar const *, TextPosition, TextPosition *, TextPosition *, DocId, DocId) const;
@@ -322,14 +330,14 @@ private:
                 // Rank among the end-markers in BWT
                 unsigned endmarkerRank = tmp_rank_c-1; //alphabetrank->rank(0, i) - 1;
                 DocId docId = Doc->access(endmarkerRank);
-                result.push_back(make_pair(docId, dist)); 
+                result.push_back(std::make_pair(docId, dist)); 
             }
             else
             {
                 TextPosition textPos = (*suffixes)[sampled->rank1(i)-1] + dist;
                 DocId docId = (*suffixDocId)[sampled->rank1(i)-1];
 
-                result.push_back(make_pair(docId, textPos));
+                result.push_back(std::make_pair(docId, textPos));
             }
         }
     }
@@ -358,7 +366,7 @@ private:
                 unsigned endmarkerRank = tmp_rank_c-1; //alphabetrank->rank(0, i) - 1;
                 DocId docId = Doc->access(endmarkerRank);
                 if (docId >= begin && docId <= end)
-                    result.push_back(make_pair(docId, dist)); 
+                 result.push_back(std::make_pair(docId, dist)); 
             }
             else
             {
@@ -366,7 +374,7 @@ private:
                 DocId docId = (*suffixDocId)[sampled->rank1(i)-1];
 
                 if (docId >= begin && docId <= end)
-                    result.push_back(make_pair(docId, textPos));
+                 result.push_back(std::make_pair(docId, textPos));
             }
         }
     }