Boost logo

Boost Users :

Subject: [Boost-users] b-tree merge
From: Jeff Ramsey (jramsey123_at_[hidden])
Date: 2011-12-14 17:29:22


As an example, I've the following b-tree model with each node containing
tag/value pairs. The tree indicates precedence (or priority), with the
root being highest, down to the leaves as lowest (but this is application
specific). I want to merge a new tree section into the parent, with the
new section containing potentially common tag/value pairs all the way down
to the node just above a leaf node (a completely duplicate new tree section
would just not be merged). E.g.

Existing tree (tag,value) pairs indicated:
                   A,0
     ,----------,----|--------,
   B,1 B,2 B,3
          ,------|------,
         C,1 C,2

New tree to merge:
                   A,0
                     |
                   B,3
              ,------|------,
            C,1 C,2

Final merged tree:
                   A,0
     ,----------,----|--------------,
   B,1 B,2 B,3
          ,------|------, ,-----------,
         C,1 C,2 C,1 C,2

Question: is there a boost solution to this b-tree merge, and if not any
suggestions? Thanks.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net