X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=libcds%2Fsrc%2Fstatic_sequence%2Fstatic_sequence_wvtree.cpp;h=ca935948030ec3e3deb5f8c103f5e9de9915484b;hb=e38bc834442d5369a523ba47d74865e48995ace4;hp=b4a62987da5bb532ff40e0ae0bf9d891f37f1414;hpb=95f2dabec7cabe4002865e5f9d12651e6e32229a;p=SXSI%2FXMLTree.git diff --git a/libcds/src/static_sequence/static_sequence_wvtree.cpp b/libcds/src/static_sequence/static_sequence_wvtree.cpp index b4a6298..ca93594 100644 --- a/libcds/src/static_sequence/static_sequence_wvtree.cpp +++ b/libcds/src/static_sequence/static_sequence_wvtree.cpp @@ -22,6 +22,7 @@ #include static_sequence_wvtree::static_sequence_wvtree(uint * symbols, uint n, wt_coder * c, static_bitsequence_builder * bmb, alphabet_mapper * am) { + this->n = n; for(uint i=0;imap(symbols[i]); this->am = am; @@ -34,6 +35,7 @@ static_sequence_wvtree::static_sequence_wvtree(uint * symbols, uint n, wt_coder } static_sequence_wvtree::static_sequence_wvtree(uchar * symbols, uint n, wt_coder * c, static_bitsequence_builder * bmb, alphabet_mapper * am) { + this->n = n; for(uint i=0;imap((uint)symbols[i]); this->am = am; @@ -101,7 +103,7 @@ vector static_sequence_wvtree::accessAll(uint i, uint j) if (j < i) return resultSet; - resultSet.reserve(j-i+1); + // resultSet.reserve(j-i+1); // avoid reallocation root->access(resultSet, i, j); for (vector::iterator it = resultSet.begin(); it != resultSet.end(); ++it) *it = am->unmap(*it);