Calculates the length of the shortest path between any pair of nodes in a network.
Syntax:
shortest_path_mtx =
get_shortest_path_matrix(connectivity_mtx)
shortest_path_mtx =
get_shortest_path_matrix(connectivity_mtx, ...
max_path_length)
where
connectivity_mtx = adjacency matrix
max_path_length = maximal path-length to consider
shortest_path_mtx = matrix of minimum path lengths
Function calculates minimum path-length between any pair of nodes. Paths
of length greater than the (optional) maximal path-length are not
considered. Nodes that are not connected by a path up to the maximal
path-length are are assigned a path length of zero, i.e.
shortest_path_mtx(i,j) = length of shortest path from i to j
or 0 if path does not existant or
longer than max_path_length |