2 #ifndef _STATIC_SEQUENCE_GMR_CHUNK_H
3 #define _STATIC_SEQUENCE_GMR_CHUNK_H
6 #include <static_bitsequence.h>
7 #include <static_bitsequence_builder.h>
8 #include <static_permutation.h>
14 /** Implementation of the Chunk of Golynski et al's rank/select
17 * [1] A. Golynski and I. Munro and S. Rao.
18 * Rank/select operations on large alphabets: a tool for text indexing.
21 * @author Francisco Claude
23 class static_sequence_gmr_chunk: public static_sequence {
25 /** Builds the structures needed for the chunk */
26 static_sequence_gmr_chunk(uint * sequence, uint chunk_length, static_bitsequence_builder *bmb, static_permutation_builder *pmb);
28 /** Destroy the chunk */
29 ~static_sequence_gmr_chunk();
31 virtual uint access(uint j);
32 virtual uint select(uint i, uint j);
33 virtual uint rank(uint i, uint j);
35 virtual uint save(FILE *fp);
36 static_sequence_gmr_chunk * load(FILE *fp);
40 static_bitsequence * X;
42 static_permutation permutation;
43 /** Size of the alphabet */
45 /** Length of the chunk */