Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
fix dijkstra pathcount overflow (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbromberger authored Aug 10, 2018
1 parent 6f019a2 commit 3b75ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shortestpaths/dijkstra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct DijkstraState{T <: Real,U <: Integer} <: AbstractPathState
parents::Vector{U}
dists::Vector{T}
predecessors::Vector{Vector{U}}
pathcounts::Vector{U}
pathcounts::Vector{UInt64}
closest_vertices::Vector{U}
end

Expand Down Expand Up @@ -40,7 +40,7 @@ function dijkstra_shortest_paths(g::AbstractGraph,
parents = zeros(U, nvg)
visited = zeros(Bool, nvg)

pathcounts = zeros(Int, nvg)
pathcounts = zeros(UInt64, nvg)
preds = fill(Vector{U}(), nvg)
H = PriorityQueue{U,T}()
# fill creates only one array.
Expand Down

0 comments on commit 3b75ff7

Please sign in to comment.