X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=libcds%2Fsrc%2Fstatic_sequence%2Fwt_node_internal.cpp;h=b4727a316777f4882caa66137bbcd7e0773fd402;hb=52cb7bbcda67f4676335cdd4eb96d4d87ad1445d;hp=e741b6f5e7198a5f46ea48953d800d9726ce2391;hpb=0bf9688e2615a9fc07860c5762240e4ce26ee5d3;p=SXSI%2FXMLTree.git diff --git a/libcds/src/static_sequence/wt_node_internal.cpp b/libcds/src/static_sequence/wt_node_internal.cpp index e741b6f..b4727a3 100644 --- a/libcds/src/static_sequence/wt_node_internal.cpp +++ b/libcds/src/static_sequence/wt_node_internal.cpp @@ -1,7 +1,26 @@ - +/* wt_node_internal.cpp + * Copyright (C) 2008, Francisco Claude, all rights reserved. + * + * wt_node_internal + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + #include - wt_node_internal::wt_node_internal(uint * symbols, uint n, uint l, wt_coder * c, static_bitsequence_builder * bmb) { uint * ibitmap = new uint[n/W+1]; for(uint i=0;i0) { - if(match_left) + if(match_left/* && c->done(left[0],l+1)*/) left_child = new wt_node_leaf(left[0], count_left); else left_child = new wt_node_internal(left, count_left, l+1, c, bmb); @@ -40,7 +59,7 @@ wt_node_internal::wt_node_internal(uint * symbols, uint n, uint l, wt_coder * c, left_child = NULL; } if(count_right>0) { - if(match_right) + if(match_right/* && c->done(right[0],l+1)*/) right_child = new wt_node_leaf(right[0], count_right); else right_child = new wt_node_internal(right, count_right, l+1, c, bmb);