Skip to content

Commit

Permalink
Update dijkstra.go
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzotinfena committed Mar 9, 2024
1 parent e23b088 commit aef6498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collections/graph/dijkstra.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func WeightedDijkstra[V comparable, W constr.Integer | constr.Float](
toAnalyze := heap.NewFibonacciHeap[V](
func(v1, v2 V) bool { return dijkstraGet(v1).Cost < dijkstraGet(v2).Cost },
fibonacciSet, fibonacciGet, dijkstraContains, fibonacciRemove)
toAnalyze.Push(start)
dijkstraSet(start, &DijkstraNode[V, W]{start, nil, W(0)})
toAnalyze.Push(start)

return &weightedDijkstraIterator[V, W]{
toAnalyze,
Expand Down

0 comments on commit aef6498

Please sign in to comment.