projects
/
SXSI
/
TextCollection.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added SWCSA
[SXSI/TextCollection.git]
/
TextStorage.h
diff --git
a/TextStorage.h
b/TextStorage.h
index
fcd66e5
..
6294c6b
100644
(file)
--- a/
TextStorage.h
+++ b/
TextStorage.h
@@
-23,7
+23,16
@@
#include "TextCollection.h"
#include "Tools.h"
#include "TextCollection.h"
#include "Tools.h"
+
#include "incbwt/bits/deltavector.h"
#include "incbwt/bits/deltavector.h"
+// Re-define word size to ulong:
+#undef W
+#if __WORDSIZE == 64
+# define W 64
+#else
+# define W 32
+#endif
+
#include <cassert>
#include <stdexcept>
#include <cassert>
#include <stdexcept>
@@
-104,11
+113,6
@@
protected:
offsets_ = new CSA::DeltaVector(encoder, n_);
offsets_ = new CSA::DeltaVector(encoder, n_);
-
-/* for (ulong i = 0; i < n_-1; ++i)
- if ((text[i] == '\0') != IsEndmarker(i))
- std::cout << "misplaced endmarker at i = " << i << std::endl;
-*/
numberOfTexts_ = offsets_->rank(n_ - 1);
}
numberOfTexts_ = offsets_->rank(n_ - 1);
}
@@
-182,7
+186,7
@@
private:
/******************************************************************
* LZ-index text collection.
*/
/******************************************************************
* LZ-index text collection.
*/
-struct LzTriePimpl; //
Pimpl, declared in .cpp
+struct LzTriePimpl; //
Using Pimpl idiom to hide LzTrie implementation.
class TextStorageLzIndex : public TextStorage
{
class TextStorageLzIndex : public TextStorage
{
@@
-252,7
+256,7
@@
public:
private:
TextPosition n_;
private:
TextPosition n_;
- uchar *text_;
// FIXME Replace with a succinct representation.
+ uchar *text_;
bool freeText;
}; // class TextStorageBuilder
bool freeText;
}; // class TextStorageBuilder