New rank/select data structure based on sadakane's code
[SXSI/XMLTree.git] / libcds / src / static_bitsequence / static_bitsequence_rrr02_light.cpp
index 746f5cf..f073e69 100644 (file)
@@ -119,13 +119,11 @@ void static_bitsequence_rrr02_light::create_sampling(uint sample_rate) {
 }
 
 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);