Skip to content

Commit

Permalink
Merge pull request #357 from Circuitscape/RA/333
Browse files Browse the repository at this point in the history
fix sparse mat constrcution
  • Loading branch information
ranjanan authored Apr 2, 2022
2 parents 32493f7 + 8012117 commit 2de9872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/network/advanced.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function compute_advanced_data(data::NetworkData{T,V},
idx = findfirst(x -> x < 1, j)
idx != nothing && throw("Indices no good")

m = max(i[end], j[end])
m = max(maximum(i), maximum(j))
A = sparse(i,j,v,m,m)
A = A + A'

Expand Down
2 changes: 1 addition & 1 deletion src/network/pairwise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function compute_graph_data(data::NetworkData{T,V}, cfg)::GraphProblem{T,V} wher
idx = findfirst(x -> x < 1, j)
idx != nothing && throw("Indices no good")

m = max(i[end], j[end])
m = max(maximum(i), maximum(j))
A = sparse(i,j,v,m,m)
A = A + A'

Expand Down

0 comments on commit 2de9872

Please sign in to comment.