3 ms·
I'm the author of the book... It may be fairly simple for you to change your design to generate a static call graph for the nodes using topographical sort. The
by mattcarkci 13y ago
I'm the author of the book...
It may be fairly simple for you to change your design to generate a static call graph for the nodes using topographical sort. Then on each "tick" you simply execute each node, in order, from top to bottom.
I always like to use a stack to schedule execution because I can then change the algorithm that schedules them to use a very different method.
- Matt Carkci
- nitrogen 13y agoTopographical sort is actually what I use, storing the results of the sort in a run list as you describe. The tricky part was dealing with cycles in the graph.