Maven module :un.api : api-common :
Class : un.api.graph.operation.Dijkstra
Extends/Implements : -
Subclasses : -

Dijkstra algorithm to find the shortest path in a graph.
https://en.wikipedia.org/wiki/Dijkstra's_algorithm
author  Johann Sorel


Variables : -
Functions : buildGraph, getShortestPath, getShortestPath




Build the distance graph from given source node.
param  source origin of the dijkstra graph
param  distanceExp expression used to evaluate the distance for each edge
public void buildGraph (Vertex source, Expression distanceExp)


Can only be used after a call to buildGraph.
param  target vertex aimed
return  sequence of vertex from source to target.
public Sequence getShortestPath (Vertex target)


Get the shortest path from source to target.
param  source origin of the dijkstra graph
param  target vertex aimed, can be null
param  distanceExp expression used to evaluate the distance for each edge
return  sequence of vertex from source to target.
public Sequence getShortestPath (Vertex source, Vertex target, Expression distanceExp)