Graph examples
- Posted by kajyr on July 29th, 2009
- Comment now »
I’ve always been fascinated by networks, and everything that can be modeled as a graph. In some spare time one I’ve tried to model a simple graph structure in actionscript 3 that can be implemented to render some nice example. I want to extend it by adding some graph algorhythm like Breadth-first search, Depth-first seach, Dijkstra and others, just to keep mind busy in the summer, since in 3 days from now i’ll be officially unemployed.
So the first example consists in a bunch of nodes connected.. uhhu! Nodes can be activated, and each time this happens to a node, there is a chance that he activates his neighbours.
If you want to see the code, there are two steps: I’ve stored the code that models the network (the Graph class and the INode interface) in a simple framework of mine that you can checkout from here; then you can download the project as a zip file from this link)
As a references, you should see Levitated examples on networks, starting by this one or by this one.