2 #ifndef STATIC_SEQUENCE_WVTREE_H
3 #define STATIC_SEQUENCE_WVTREE_H
7 #include <static_bitsequence.h>
8 #include <static_bitsequence_builder.h>
9 #include <wt_node_internal.h>
10 #include <wt_coder_binary.h>
11 #include <alphabet_mapper.h>
12 #include <static_sequence.h>
16 class static_sequence_wvtree : public static_sequence {
19 /** Builds a Wavelet Tree for the string
20 * pointed by symbols assuming its length
21 * equals n and the test flag allows to set
22 * if the structure must be tested for
23 * correctness after being created (this is very expensive). */
24 static_sequence_wvtree(uint * symbols, uint n, wt_coder * coder, static_bitsequence_builder * bmb, alphabet_mapper * am);
26 virtual ~static_sequence_wvtree();
28 virtual uint rank(uint symbol, uint pos);
30 virtual uint select(uint symbol, uint i);
32 virtual uint access(uint pos);
34 virtual uint count(uint s);
38 virtual uint save(FILE * fp);
39 static static_sequence_wvtree * load(FILE *fp);
42 static_sequence_wvtree();
47 //bitmap_builder * bmb;
49 /** Length of the string. */
52 /** Height of the Wavelet Tree. */
55 /** Flag for testing for correcteness. */
60 #endif /* _STATIC_SEQUENCE_WVTREE_H */