Re: #64765 - g_node_traverse- G_LEVEL_ORDER



On 26 Nov 2001, Michael Natterer wrote:

> Owen Taylor <otaylor redhat com> writes:
> 
> > G_LEVEL_ORDER currently is documented (and behaves as)
> >  
> >  For N-ary Trees, it calls the function for
> >  each child then it recursively visits each child.
> > 
> > Tim believes that this was just a implementation bug 
> > when he implemented it that then was documented by
> > reading the code, and that the correct behavior should
> > be:
> > 
> >  It visits all nodes at each depth, before continuing
> >  on to visit all nodes at the next deeper depth, 
> >  and so on until all descendents have been visited.
> > 
> > And there has been some agreement that this is a
> > more expected behavior.
> > 
> > Does anybody have any opinion on this? Is anyone
> > actually using G_LEVEL_ORDER? (the current behavior
> > is argueably basically useless)
> 
> IMHO it should be changed to the behaviour proposed by Tim. Currently
> there is no way to do a breadth first search on a tree, only
> variations of depth first (which is bad (TM) :-).

i believe that's what matthias is doing in his patch (should be attached
to teh bug report).

> 
> just my 2 pf,

yeah, merely a month left to spread pfennige ;)

> --Mitch
> 

---
ciaoTJ




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]