Research Article
A Multilevel Simplification Algorithm for Computing the Average Shortest-Path Length of Scale-Free Complex Network
Algorithm 2
Restore the ASPL of
from the multisimplified graph.
(1) depth = 1 | (2) if is_: | (3) Length_Reduced += Length_to_Connector + Number_of_Path_to_Connector + 1 | (4) Number_of_Path_Reduced += Number_of_Path_to_Connector + 1 | (5) if (connector next == leaf) return | (6) else | (7) while (connector next <> leaf) | (8) | (9) Length_Reduced += Length_to_Connector + depth * Number_of_Path_to_Connector + depth + 1 | (10) Number_of_Path_Reduced += Number_of_Path_to_Connector + depth | (11) connector = connector next |
|