diff --git a/core/DijkstraGraphDistance.cs b/core/DijkstraGraphDistance.cs index f06023f4..540f69c7 100644 --- a/core/DijkstraGraphDistance.cs +++ b/core/DijkstraGraphDistance.cs @@ -225,6 +225,7 @@ protected void Compute_Dense() { while (DenseQueue.Count > 0) { float idx_priority = DenseQueue.FirstPriority; + max_value = Math.Max(idx_priority, max_value); int idx = DenseQueue.Dequeue(); GraphNodeStruct g = DenseNodes[idx]; g.frozen = true; @@ -232,7 +233,6 @@ protected void Compute_Dense() order.Add(g.id); g.distance = max_value; DenseNodes[idx] = g; - max_value = Math.Max(idx_priority, max_value); update_neighbours_dense(g.id); } } @@ -584,4 +584,4 @@ void update_neighbours_dense(int parent_id) } -} +} \ No newline at end of file