I have a graph which I need to build a rollup mechanism for, as the diagram shows. While new to the DSL I thought that the Path Finding Depth First Search routines would be the way to go. But I don’t see how this would work or how I would call, for each traversed node, an external mechanism to do something. Initially a weighted rollup calculation, or other things as new needs emerge (think a rules engine like Apache Drools).
Do I have to build all this from scratch or, am I missing something?
maybe I dont use a recursive mechanism? given the start and end nodes in a path I query for the path and receive the node ids in the correct order.. then process the pathway in reverse order, and query each node for their values, do some calculations, and set those results in each node as I reverse process them? Is that the way to do this sort of thing.. I wouldn't have to worry about circular pathways.. but i might miss nodes.. sigh.. what do you guys think?
Thanks Guys!
This can easily be done using the Java API and developing a custom procedure.
Yep.. that's what I thought. just wanted to confirm that. but you have to worry about cyclical paths and, all that stuff. it gets more interesting when you are not dealing with a simple binary treee.. :)
You would think a mechanism would exist inside the Path Finding set of algorithms to handle this. I wonder why there isn't one already?.. okay.. thank you again for your kindness shown towards me.
My graphs don't have cyclical scenarios. I supposed you could keep a set of all the nodes you have already traversed and check the set each time you process a node.
There is a Traversal framework that you can see if it fits your needs. I just wrote my own for my specific requirement because it was fairly straightforward.
THANKS MAN.. I will be digging into this one.. Thanks Gary! thanks man!