From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-05-23 10:06:56
On 05/20/08 12:04, John Femiani wrote:
> Is a tree a good way to describe a path? I mean, the path itself is a
> basically a list of names right? Many of us think of the filesystem
> itself as a tree (whether it is or not, at least it is a digraph).
> To me a path is a sequence (a list) of connected nodes in a graph (or
> tree), and this analogy shold hold with filesystem. A leaf is a node in
> a tree with no out-edges, and the last node in a path may or may not be
> a leaf.
This makes the most sense to me. A path, to paraphrase John, is
nothing more than directions to a location in a tree. Whether the
directions lead to a leaf or not depends on the "context" i.e. on the
tree that's being traversed. So, I think back (or maybe last as
*maybe* John was implying above with 'last node in a path') would be
the best name for accessing the last component in the path.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk