All-pairs Shortest Dynamic Path Length Algorithm
This function computes the Shortest Dynamic Path Length defined in the paper "Understanding and Modeling the Small-World Phenomenon in Dynamic Networks - AD. Nguyen et al - MSWIM 2012" between all pairs of nodes in a dynamic network.
Inputs:
- states: the temporal graphs under form of 3D-matrix in which the 1st and 2nd denotes node's IDs and the 3rd dimension denotes the time. states(:,:,t) is the network adjacency matrix at time t (i.e. state(i,j,t) = 1 if i is connected to j at time t and 0 otherwise). state(i,i,t) = 1 for all i. The shortest path lengths are calculated from the beginning of states.
- find_path: find the shortest paths if a non zero value was entered.
Outputs:
- d: the average shortest dynamic path length of the network.
- D: the matrix containing the shortest dynamic path lengths between all pairs of nodes.
- E: the list of encounters, if find_path is not equal to 0. The function findAllPaths uses this to find all the shortest paths between all pairs of nodes.
Please refer to the paper for more details.
Cite As
Anh-Dung Nguyen (2024). All-pairs Shortest Dynamic Path Length Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/39739-all-pairs-shortest-dynamic-path-length-algorithm), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.