How to develop an application with pgrouting in Windows (3): the Dijkstra algorithm

Given a graph and a source vertex in the
graph, Dijkstra’s
algorithm  finds the shortest
paths from source to all vertices in the given graph. It takes as input an oriented graph weighted by real positive
numbers and a top source as root. This is to build gradually a subgraph where
the different vertices are classified in ascending order according their
minimum distance from the root. The distance is the sum of the weights of the
arcs followed.

The syntax of the Dijkstra algorithm is as follows :


Continue reading “How to develop an application with pgrouting in Windows (3): the Dijkstra algorithm”