On Tue, 16 Dec 2008 13:05:44 -0800 (PST) "Edward K. Ream" <[email protected]> wrote:
> Leo can and should support general graphs. Woohoo :-) > Iterators like c.allNodes_iter() and p.subtree_iter() will skip a node > if p.isBackLink(p2) is True. Recognizing back links is easy: p2 is a > back link if p2.v is in p.stack. Right, so as long as search and everything else uses these routines, it should work. I know I've used my own recursion code a couple of times for reasons I can't remember (possibly unnecessarily) - once I think it the code that finds the longest match for UNL lookups (which, perhaps, would be depreciated by general graph support) - anyway, those cases will be easy to spot, as they'll hit the maximum recursion depth :-) I wonder if fewer things would break if children_iter() also ignored nodes already seen unless an optional keyword argument was set True? Maybe see whether that's needed or not when the time comes. Anyway, this sounds great to me. Thanks for the debate. Cheers -Terry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
