Re: Looking for tree-like structure



mathieu wrote:
I am looking for the proper structure for the following problem. I
would like to read in memory a file that has the following structure:

k1, v1
k2, v2
k3, v3
k4 /
k1, v11
k3, v33
k5, v5
k6/
k2, v22
k9/
k1, v111
k2, v222
k7, v7

In the previous example k(i) is an uint32_t where 0 < k1 < k2 < ...
< k8 < k9 and v(i) is just some data associated with the k(i). Note
that there is no data associated with k4, k6 or k9 for instance (k4,k6
and k9 are special keys). There can be gap (k8 is missing), and the
tree can be any level deep. I understand that most tree structure (B,
multi-way) cannot deal with the fact that k9 (>k7) was introduced under
k6.

Why not use XML as the text representation and an XML parse tree for
your data?

.



Relevant Pages

  • Re: I have a gap
    ... However, we did make it through without too much damage, comparatively ... When I saw all the tree damage, I kept thinking of what JRRT said about the ... > The group was online all the time, and I can't help you with the gap. ... > on Supernews, too, and presently they do carry posts longer than a week; ...
    (rec.arts.books.tolkien)
  • Help: Weeping Cherry not doing well - growth maybe?
    ... I have a fairly large weeping cherry approx 10 years old 8' high by ... 12' wide that appears to be not healthy. ... The tree sits in full sun and in a 12' to 15" planted area next ... be a hard bulge not too normal looking with a gap in the center. ...
    (rec.gardens)
  • Re: Largest DNA missing link?
    ... I know we have a branching tree but each branch is far from continuous, ... We haven't really done enough species to ... So the gap between chimps and humans using these estimates ...
    (talk.origins)
  • Re: The Bountyhunter (USA) 2010
    ... Bambi's mother... ... a gap of nearly a half-century. ... there was AVATAR's tree, of course, but I may be confusing tears with ...
    (rec.arts.movies.current-films)