Home   >   User Resources   >   Online Help   >   apaGraph.ShortestDistances.From
 

 

Function index Version 3.0.0

apaGraph.ShortestDistances.From(AdjacencyMatrix, StartIndex)

Excel=apaGraph.ShortestDistances.From(AdjacencyMatrix, StartIndex)

Result

Calculates the shortest distances from a given node (vertex) to all other nodes of a graph with Dijkstra’s algorithm.

Syntax

AdjacencyMatrix: n x n adjacency matrix

StartIndex: index of the starting node

Remarks

Entries of AdjacencyMatrix that are zero, empty or infinite mean that there is no edge. The distances to nodes that cannot be reached from a node are shown as #N/A.