|
24 | 24 | namespace cds_static |
25 | 25 | { |
26 | 26 |
|
27 | | - WaveletTreeNoptrsS::WaveletTreeNoptrsS(const Array &symb, BitSequenceBuilder * bmb, Mapper * am) : Sequence(n) { |
| 27 | + WaveletTreeNoptrsS::WaveletTreeNoptrsS(const Array &symb, BitSequenceBuilder * bmb, Mapper * am) : Sequence(0) { |
28 | 28 | bmb->use(); |
29 | 29 | this->n=symb.getLength(); |
| 30 | + this->length = this->n; // sets Sequence::length (Sequence(0) in initializer) |
30 | 31 | this->am=am; |
31 | 32 | bool deleteSymbols = true; |
32 | 33 | am->use(); |
@@ -80,7 +81,7 @@ namespace cds_static |
80 | 81 | _bm[i][j]=0; |
81 | 82 | } |
82 | 83 |
|
83 | | - build_level(_bm,new_symb,new_n,occurrences); |
| 84 | + build_level(_bm,new_symb,new_n); |
84 | 85 | bitstring = new BitSequence*[height]; |
85 | 86 | for(uint i=0;i<height;i++) { |
86 | 87 | bitstring[i] = bmb->build(_bm[i],new_n); |
@@ -148,7 +149,7 @@ namespace cds_static |
148 | 149 | _bm[i][j]=0; |
149 | 150 | } |
150 | 151 |
|
151 | | - build_level(_bm,new_symb,new_n,occurrences); |
| 152 | + build_level(_bm,new_symb,new_n); |
152 | 153 | bitstring = new BitSequence*[height]; |
153 | 154 | for(uint i=0;i<height;i++) { |
154 | 155 | bitstring[i] = bmb->build(_bm[i],new_n); |
@@ -328,7 +329,7 @@ namespace cds_static |
328 | 329 | return bytesBitstrings+occ->getSize()+ptrs; |
329 | 330 | } |
330 | 331 |
|
331 | | - void WaveletTreeNoptrsS::build_level(uint **bm, uint *symbols, uint length, uint *occs) { |
| 332 | + void WaveletTreeNoptrsS::build_level(uint **bm, uint *symbols, uint length) { |
332 | 333 | // for (uint i = 0; i < length; i++) |
333 | 334 | // cout << " " << symbols[i]; |
334 | 335 | // cout << endl; |
|
0 commit comments