Skip to content
Permalink
e9a6a15a85
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit befd8e4 Aug 25, 2021 History
1 contributor

Users who have contributed to this file

34 lines (20 sloc) 612 Bytes
# # #balance_scratch adaptive_balancing R1
# # #global
# import networkx as nx
# from Graphs import *
# from random import random
# A = GridGraph(10,[0,99])
# A.show_graph()
# A.add_graph()
# for u,v in A.G.edges:
# A.G[u][v]["perturbed_weight"] = 1+random()/1000
# print(len(A.shortest_path(0,99)))
# # import networkx as nx
# # import random
# # # random.seed(42)
# # city_graph = A.G #nx.complete_graph(10)
# # for u,v in A.G.edges:
# # print(u,v)
# # A.G[u][v]["custom_length"] = 1+ random.randint(1, 10)/10000
# # print(list(city_graph.edges(data=True)))
# # # (0, 1, {'custom_length': 2})