Research Article
A Multilevel Simplification Algorithm for Computing the Average Shortest-Path Length of Scale-Free Complex Network
Algorithm 1
Calculate the ASPL of
from the simplified graph
.
(1) for in | (2) for in : | (3) if ( <> ): | (4) Number_of_Path_of_ | (5) Length = Shortest_Path_ | (6) Length_of_ += Length | (7) if is_: | (8) Number_of_Path_to_ += Number_of_suspension_edges_ | (9) Length_to_ += Length * Number_of_suspension_edges_ | (10) Length_of_ = Length_of_ + Length_to_Connector + Number_of_Path_to_Connector + Number_of__nodes | (11) Number_of_path_of_ = Number_of_Path_of_ + Number_of_Path_to_Connector + Number_of__nodes |
|