Skip to content

Commit

Permalink
Merge pull request #15 from mtfishman/fix_#1594
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfairbanks authored Oct 22, 2021
2 parents d2d6d29 + 40e5f96 commit 768c260
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/linalg/spectral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ function _adjacency_matrix(g::AbstractGraph, T::DataType, neighborfn::Function,
for j in 1:n_v # this is by column, not by row.
if has_edge(g, j, j)
push!(selfloops, j)
if !(T <: Bool) && !is_directed(g)
nz -= 1
end
end
dsts = sort(neighborfn(g, j)) # TODO for most graphs it might not be necessary to sort
colpt[j + 1] = colpt[j] + length(dsts)
Expand Down

0 comments on commit 768c260

Please sign in to comment.