in reply to Re^4: In search of an algorithm for loading cyclic graphs
in thread In search of an algorithm for loading cyclic graphs
Either way, it doesn't matter. Create a links table and load that after loading all the nodes in their various types. That's the cleanest solution. Loading the links at the same time as the nodes is going to run into problems with cycles. But, you already knew that.
An alternate solution is what Data::Dumper does and that's to keep track of what nodes have been seen before and stop following the tree when you find somewhere you've been. I don't know if that will work, given the code you've already written.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: In search of an algorithm for loading cyclic graphs
by samtregar (Abbot) on May 17, 2005 at 18:58 UTC |