You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pb...@collab.net> on 2007/04/14 15:49:11 UTC

Tree terminology Question: children vs descendants

While working on merge-tracking these last few weeks a question on tree
terminology came up:

In this tree:

A
|___
|   |
B   C
|   |___
|   |   |
D   E   F

When we talk about A's children do we mean B,C,D,E,F or only B and C?

In the doc string for functions like discover_and_merge_children() we
use "child" to mean the former, i.e. all descendants of A.

But the stricter mathematical/CS definition as I understand it is the
latter, i.e. only nodes connected by one edge.

Is it best to describe B and C as "immediate children" as is done in
svn_depth_t to avoid confusion?  Is there a "real" graph theory term to
describe B and C? 

Paul B.

P.S. Remember, children are our future! :-P

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


RE: Tree terminology Question: children vs descendants

Posted by Kamesh Jayachandran <ka...@collab.net>.
>When we talk about A's children do we mean B,C,D,E,F or only B and C?
>
>In the doc string for functions like discover_and_merge_children() we
>use "child" to mean the former, i.e. all descendants of A.

>But the stricter mathematical/CS definition as I understand it is the
>latter, i.e. only nodes connected by one edge.

>Is it best to describe B and C as "immediate children" as is done in
>svn_depth_t to avoid confusion?  Is there a "real" graph theory term to
>describe B and C? 

Yes you can change the docstring to 'descendants'. May be the function name to discover_and_merge_decendants.
In real graph theory is it "'B' and 'C' adjacent nodes to 'A'."?


With regards
Kamesh Jayachandran

Re: Tree terminology Question: children vs descendants

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 16 Apr 2007, C. Michael Pilato wrote:

> Paul Burba wrote:
> > While working on merge-tracking these last few weeks a question on tree
> > terminology came up:
> > 
> > In this tree:
> > 
> > A
> > |___
> > |   |
> > B   C
> > |   |___
> > |   |   |
> > D   E   F
> > 
> > When we talk about A's children do we mean B,C,D,E,F or only B and C?
> 
> When *I* say it, I mean [B, C].
> 
> > In the doc string for functions like discover_and_merge_children() we
> > use "child" to mean the former, i.e. all descendants of A.
> 
> That's no good.  Call those "descendants".

I'm not a big fan of the term "descendants" here, since to me it means
something else in terms of versioned nodes in Subversion's file system
(closer to "successors").  No better suggestion ATM, though.  *shrug*

Re: Tree terminology Question: children vs descendants

Posted by "C. Michael Pilato" <cm...@collab.net>.
Paul Burba wrote:
> While working on merge-tracking these last few weeks a question on tree
> terminology came up:
> 
> In this tree:
> 
> A
> |___
> |   |
> B   C
> |   |___
> |   |   |
> D   E   F
> 
> When we talk about A's children do we mean B,C,D,E,F or only B and C?

When *I* say it, I mean [B, C].

> In the doc string for functions like discover_and_merge_children() we
> use "child" to mean the former, i.e. all descendants of A.

That's no good.  Call those "descendants".

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand