Skip to content

Commit 8510dae

Browse files
authored
Update staticgraph.jl
fixed bug in `ne`
1 parent 6b0abb2 commit 8510dae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/staticgraph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ end
4040

4141
badj(g::StaticGraph, s) = fadj(g, s)
4242

43-
ne(g::StaticGraph{T, U}) where T where U = T(length(g.f_vec) ÷ 2)
43+
ne(g::StaticGraph{T, U}) where T where U = U(length(g.f_vec) ÷ 2)
4444

4545
function has_edge(g::StaticGraph, e::StaticGraphEdge)
4646
u, v = Tuple(e)
@@ -67,4 +67,4 @@ Return `true` if `g` is a directed graph.
6767
"""
6868
is_directed(::Type{StaticGraph}) = false
6969
is_directed(::Type{StaticGraph{T, U}}) where T where U = false
70-
is_directed(g::StaticGraph) = false
70+
is_directed(g::StaticGraph) = false

0 commit comments

Comments
 (0)