Browse Source

that was not enough

tarfeef101 6 years ago
parent
commit
998b3b15a3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      a3/router.py

+ 5 - 1
a3/router.py

@@ -146,7 +146,11 @@ class graph:
     def rebuild(this):
         print("Before building")
         print(this.alist)
-        this.sssp = [(inf, rid - 1)] * 5
+        #this.sssp = [(inf, rid - 1)] * 5
+        
+        # set the adjacent node for each node
+        for i in range(0, 5):
+            this.sssp[i - 1][1] = i
         this.sssp[rid - 1] = (0, rid - 1)
         
         curnode = rid - 1