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

Commit

Permalink
back to int()
Browse files Browse the repository at this point in the history
  • Loading branch information
sbromberger committed Feb 10, 2015
1 parent a9123fc commit b27abce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ function adjacency_matrix(g::AbstractGraph)
end

function laplacian_matrix(g::Graph)
A = map(Int, adjacency_matrix(g))
A = int(adjacency_matrix(g))
D = spdiagm(sum(A,2)[:])
return D - A
end

laplacian_spectrum(g::Graph) = eigvals(full(laplacian_matrix(g)))

adjacency_spectrum(g::AbstractGraph) = eigvals(full(map(Int, adjacency_matrix(g))))
adjacency_spectrum(g::AbstractGraph) = eigvals(full(int(adjacency_matrix(g))))

0 comments on commit b27abce

Please sign in to comment.