Code covered by the BSD License  

Highlights from
get_shortest_path_matrix

2.0

2.0 | 1 rating Rate this file 11 Downloads (last 30 days) File Size: 1.64 KB File ID: #36033
image thumbnail

get_shortest_path_matrix

by

 

05 Apr 2012 (Updated )

Calculates the length of the shortest path between any pair of nodes in a network

| Watch this File

File Information
Description

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

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
07 Apr 2012 emmi rdx  
Updates
28 Jan 2013

performance improvements

Contact us