Subject: Re: [boost] proposal for tree container
From: Ross Levine (ross.levine_at_[hidden])
Date: 2009-07-16 03:28:35
On Thu, Jul 16, 2009 at 3:12 AM, Arash Partow <arash_at_[hidden]> wrote:
> Let me shorten that for you:
> "A tree should be an acyclic simple graph."
Haha -- this is true. However, I was trying to look at it from a
container-like perspective, not from a graph-like perspective. As already
mentioned, the BGL is capable of handling tree structures, but this class is
more for a "container with tree relations" sort of things. I tried to stay
away from mentioning that it's a planar graph.
For example, I would say this class is more suited for menu layouts with
submenus: each node is one entry, and non-leaf nodes have submenus. I think
BGL would be overkill for this sort of thing and would be more work with
which to program.
As a side note, does anyone else think it's odd that tree::sort uses sibling
iterators? Shouldn't it be templated?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk