#ifndef _CSA_H_
#define _CSA_H_
+#include "dynFMI.h"
+#include "BitRank.h"
+#include "TextCollection.h"
+#include "BlockArray.h"
+#include "RLWaveletTree.h"
+#include <set>
+#include <vector>
+
// Include from XMLTree/libcds
#include <basics.h>
#include <static_bitsequence.h>
#include <alphabet_mapper.h>
#include <static_sequence.h>
-//clash between TextCollection/Tools.h and libcds/includes/basics.h
-// Number of bits in ulong vs uint.
+// Re-define word size to ulong:
#undef W
-#undef WW
-#undef Wminusone
+#if __WORDSIZE == 64
+# define W 64
+#else
+# define W 32
+#endif
+#undef bitset
-#include "dynFMI.h"
-#include "BitRank.h"
-#include "TextCollection.h"
-#include "BlockArray.h"
-#include "RLWaveletTree.h"
-#include <set>
-#include <vector>
/**
* Implementation of the TextCollection interface
void MakeStatic();
bool EmptyText(DocId) const;
uchar* GetText(DocId) const;
+ /**
+ * Next method is not supported:
+ * Supporting GetText for some substring [i,j]
+ * would require more space.
+ */
// uchar* GetText(DocId, TextPosition, TextPosition) const;
bool IsPrefix(uchar const *) const;
bool IsContains(uchar const *) const;
bool IsLessThan(uchar const *) const;
+ ulong Count(uchar const *) const;
unsigned CountPrefix(uchar const *) const;
unsigned CountSuffix(uchar const *) const;
unsigned CountEqual(uchar const *) const;
}
private:
+ // FIXME Unused code
class TCodeEntry {
public:
unsigned count;
};
+ // FIXME Unused code
class THuffAlphabetRank {
// using fixed 0...255 alphabet
private:
}
};
+ // FIXME Unused code
class node {
private:
unsigned weight;
static TCodeEntry *makecodetable(uchar *, TextPosition);
};
+ // FIXME Unused code
static const unsigned char print = 1;
static const unsigned char report = 1;
static const uchar versionFlag;