in reply to Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?

Without reading too much, I'll point out that I have working iterator code for Tree-walking in PRE_ORDER, POST_ORDER, and LEVEL_ORDER in Tree::Fast. Feel free to crib as much as you want.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?

Replies are listed 'Best First'.
Re^2: Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?
by jryan (Vicar) on Jun 16, 2008 at 21:54 UTC
    I'm sure your code is much faster than mine, but speed really isn't an issue here, its the memory used by generating all these paths...
      My code is also a stateful iterator that is very conscious of RAM usage. This is why I pointed it to you. The name Tree::Fast is more that it's the leanest implementation of a tree in Perl that I could find.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?