diff --git a/out/production/Real Task 9/ALTGraph.class b/out/production/Real Task 9/ALTGraph.class index 4fd4dfa63d755164b54bd2811af2c5f698e53f0d..a4ace51892b50b957136b1bbf472122755d3b094 100644 Binary files a/out/production/Real Task 9/ALTGraph.class and b/out/production/Real Task 9/ALTGraph.class differ diff --git a/out/production/Real Task 9/Graph.class b/out/production/Real Task 9/Graph.class index d1f52555b9c1d85e89b9b84b48ece32ca4e39a2c..3269dd9eac281443621c3163d926209055ba0dc8 100644 Binary files a/out/production/Real Task 9/Graph.class and b/out/production/Real Task 9/Graph.class differ diff --git a/out/production/Real Task 9/Utils.class b/out/production/Real Task 9/Utils.class index 83644d25b893b6826801347b2ec716c150207910..a3908a4d99fd40fa6b179fb61f3c6bcbd08ff89e 100644 Binary files a/out/production/Real Task 9/Utils.class and b/out/production/Real Task 9/Utils.class differ diff --git a/src/Task9.java b/src/Task9.java index 763795a142b4c92a49cedfa087236d655c22c3bd..1496ac5e21a75b57d97d474fb5e08857deb2418b 100644 --- a/src/Task9.java +++ b/src/Task9.java @@ -337,11 +337,12 @@ class Graph{ int currentSum = pathWeight[start] + nextEdge.getDrivingTime(); if(currentSum<pathWeight[nextNode]) { pathWeight[nextNode] = currentSum; + //System.out.println(currentSum); for(Edge edge: adjacencyList.get(nextNode)){ edge.setCurrentWeight(pathWeight[start]); priorityQueue.add(edge); - index ++; } + index ++; priorityQueue.addAll(adjacencyList.get(nextNode)); } if(index == nodeSize) return pathWeight; @@ -464,7 +465,7 @@ class Utils{ writer.write(landmark + "\n"); for (int j : array) { if(j == array[array.length - 1]) writer.write(j + ""); - writer.write(j + "\n"); + else writer.write(j + "\n"); } } } @@ -475,7 +476,6 @@ class Utils{ String currentLine = null; int index = 0; while((currentLine = reader.readLine()) != null) { - System.out.println(index); array[index] = Integer.parseInt(currentLine); ++index; } diff --git a/testOslo.txt b/testOslo.txt index 89ff5f6277a3b9158345a3004ac94d32e544b961..7c91714c716cda7fa5a63fcba2ff4873927c163c 100644 Binary files a/testOslo.txt and b/testOslo.txt differ