Table of Contents ▸ List of Commands ▸ Matrix Computation ▸ dijkstra | ◀ diagonal | eigen ▶ |
dijkstra
Arguments:
- starting_vertex>=0,_ending_vertex={ -1:None | >=0 }
Description:
Compute minimal distances/paths in selected graphs, from specified starting_vertex to all other vertices (opt. only until ending_vertex has been reached).A graph of N vertices is specified as a NxN adjacency matrix giving the weights of all edges connecting vertices (set to inf when two vertices are not connected).
This command return a 1xNx1x2 image containing the [distance,parent] information :
distance is the minimal distance from vertex #y to the starting_vertex (i.e. the sum of edge weights composing the minimal path between these two vertices).
parent is the index of the next vertex that must be followed to reaches the starting_vertex through the minimal path.
Default values:
ending_vertex=-1