New WVTree constructor
[SXSI/XMLTree.git] / libcds / src / static_sequence / static_sequence_wvtree_noptrs.h
index 3f7a977..399f3c2 100644 (file)
@@ -40,6 +40,9 @@ class static_sequence_wvtree_noptrs : public static_sequence {
      * equals n and uses bmb to build the bitsequence */
     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();
 
@@ -75,6 +78,7 @@ class static_sequence_wvtree_noptrs : public static_sequence {
     /** 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);
@@ -88,5 +92,6 @@ class static_sequence_wvtree_noptrs : public static_sequence {
 
     /** 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