Neo4j Performing shortest path calculations on stored data
Posted
by paddydub
on Stack Overflow
See other posts from Stack Overflow
or by paddydub
Published on 2010-05-27T08:15:33Z
Indexed on
2010/05/27
18:31 UTC
Read the original article
Hit count: 355
I would like to store the following graph data in the database,
graph.makeEdge( "s", "c", "cost", (double) 7 );
graph.makeEdge( "c", "e", "cost", (double) 7 );
graph.makeEdge( "s", "a", "cost", (double) 2 );
graph.makeEdge( "a", "b", "cost", (double) 7 );
graph.makeEdge( "b", "e", "cost", (double) 2 );
Then run the Dijskra algorighm from a web servlet, to find shortest path calculations using the stored graph data. Then I will print the path to a html file from the servlet.
Dijkstra<Double> dijkstra = getDijkstra( graph, 0.0, "s", "e" );
© Stack Overflow or respective owner