#include <static_sequence.h>
#include <alphabet_mapper.h>
-using namespace std;
+//using namespace std;
class static_sequence_wvtree_noptrs : public static_sequence {
public:
/** Builds a Wavelet Tree for the string
* pointed by symbols assuming its length
* equals n and uses bmb to build the bitsequence */
- static_sequence_wvtree_noptrs(uint * symbols, uint n, static_bitsequence_builder * bmb, alphabet_mapper * am);
+ static_sequence_wvtree_noptrs(uint * symbols, uint n, static_bitsequence_builder * bmb, alphabet_mapper * am, bool deleteSymbols = false);
+
+ // symbols is an array of elements of "width" bits.
+ static_sequence_wvtree_noptrs(uint * symbols, uint n, unsigned width, static_bitsequence_builder * bmb, alphabet_mapper * am, bool deleteSymbols = false);
/** Destroys the Wavelet Tree */
virtual ~static_sequence_wvtree_noptrs();
/** Obtains the maximum value from the string
* symbols of length n */
uint max_value(uint * symbols, uint n);
+ uint max_value(uint * symbols, unsigned width, uint n);
/** How many bits are needed to represent val */
uint bits(uint val);
/** Recursive function for building the Wavelet Tree. */
void build_level(uint **bm, uint *symbols, uint level, uint length, uint offset);
+ void build_level(uint **bm, uint *symbols, unsigned width, uint level, uint length, uint offset);
};
#endif