Skip to content

Commit 19c3d81

Browse files
authored
Merge pull request #12 from slyles1001/master
Static Graphs issue #8
2 parents 238fb8f + ca56f1f commit 19c3d81

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/StaticGraphs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ end
7575
nv(g::AbstractStaticGraph{T, U}) where T where U = T(length(g.f_ind) - 1)
7676
vertices(g::AbstractStaticGraph{T, U}) where T where U = one(T):nv(g)
7777

78-
7978
has_edge(g::AbstractStaticGraph, e::AbstractStaticEdge) =
8079
insorted(dst(e), outneighbors(g, src(e)))
8180

@@ -97,6 +96,7 @@ include("staticgraph.jl")
9796
include("staticdigraph.jl")
9897
include("persistence.jl")
9998

99+
100100
const SGraph = StaticGraph
101101
const SDiGraph = StaticDiGraph
102102

@@ -105,5 +105,6 @@ const StaticEdgeIter{G} = LightGraphs.SimpleGraphs.SimpleEdgeIter{G}
105105
eltype(::Type{StaticEdgeIter{StaticGraph{T, U}}}) where T where U = StaticGraphEdge{T}
106106
eltype(::Type{StaticEdgeIter{StaticDiGraph{T, U}}}) where T where U = StaticDiGraphEdge{T}
107107

108+
include("overrides.jl")
108109

109110
end # module

src/overrides.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
adjacency_matrix(g::StaticGraph) = SparseMatrixCSC{Bool,UInt32}(nv(g), nv(g), g.f_ind, g.f_vec, ones(Bool, ne(g)*2))
2+
adjacency_matrix(g::StaticDiGraph) = SparseMatrixCSC{Bool,UInt32}(nv(g), nv(g), g.f_ind, g.f_vec, ones(Bool, ne(g)))

0 commit comments

Comments
 (0)