Commit 0e6da685 authored by Rayan  CHIKHI's avatar Rayan CHIKHI

fix

parent 49dbee15
......@@ -45,10 +45,10 @@ def main():
initial_node = max(spl.items(),key=lambda x:x[1])[0]
# now find the farthest node to it again
spl1 = nx.shortest_path_length(largest_component,initial_node)
one_extremity = max(spl.items(),key=lambda x:x[1])[0]
one_extremity = max(spl1.items(),key=lambda x:x[1])[0]
# and find the farthest node to it again
spl2 = nx.shortest_path_length(largest_component,one_extremity)
other_extremity = max(spl.items(),key=lambda x:x[1])[0]
other_extremity = max(spl2.items(),key=lambda x:x[1])[0]
path = nx.shortest_path(largest_component,one_extremity, other_extremity)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment