Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def display_tsp():
|
|
48 |
dist = dist
|
49 |
G.add_edge(i, j, weight=dist)
|
50 |
|
51 |
-
cycle =
|
52 |
edge_list = list(nx.utils.pairwise(cycle))
|
53 |
|
54 |
# Draw closest edges on each node only
|
|
|
48 |
dist = dist
|
49 |
G.add_edge(i, j, weight=dist)
|
50 |
|
51 |
+
cycle = nx.christofides(G, weight="weight")
|
52 |
edge_list = list(nx.utils.pairwise(cycle))
|
53 |
|
54 |
# Draw closest edges on each node only
|