i tried to execute this cypher query :
StringBuilder sb = new StringBuilder("START startNode = node(269604),
endNode = node(269605)
MATCH path=(startNode)-[:CAR_MAIN_NODES_RELATION*]-(endNode)
RETURN path AS shortestPath, reduce(cost=0, rel in relationships(path) |
cost + rel.edgeLength) AS t
So, how can I change this default behavior for Dijkstra's algorithm, to
allow for returning paths with different and diminishing cost?
Thank you
Antonio Grimaldi
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop
There's a limiter in Dijkstra and A* that will stop the iterator after all
paths with the lowest cost (if there are multiple) have been returned. This
could and probably should be changed to allow for returning paths with
diminishing cost as long as the user of the iterator pulls items.
2014-03-2
Hi Michael,
thanks for your answer.
I tried to use WeightedPath path = dijkstraPath.findAllPaths(startNode,
endNode);
But always one path is returned, except when there are two or more paths
with the same cost.
Instead i would like to found the firts 3 alternative path, with different
cost.
Ant
Nobody can help me?
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.