*/
#include <static_bitsequence_rrr02_light.h>
-
+using std::min;
+using std::max;
#define VARS_NEEDED uint C_len = len/BLOCK_SIZE_LIGHT + (len%BLOCK_SIZE_LIGHT!=0);\
uint C_field_bits = bits(BLOCK_SIZE_LIGHT);\
uint O_len = uint_len(1,O_bits_len);\
}
bool static_bitsequence_rrr02_light::access(uint i) {
- uint C_len = len/BLOCK_SIZE_LIGHT + (len%BLOCK_SIZE_LIGHT!=0);
uint C_field_bits = bits(BLOCK_SIZE_LIGHT);
uint O_pos_field_bits = bits(O_bits_len);
uint nearest_sampled_value = i/BLOCK_SIZE_LIGHT/sample_rate;
uint pos_O = get_field(O_pos,O_pos_field_bits,nearest_sampled_value);
uint pos = i/BLOCK_SIZE_LIGHT;
- assert(pos<=C_len);
for(uint k=nearest_sampled_value*sample_rate;k<pos;k++) {
uint aux = get_field(C,C_field_bits,k);
pos_O += E->get_log2binomial(BLOCK_SIZE_LIGHT,aux);