File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -32,24 +32,23 @@ eltype(::Type{SimpleEdgeIter{SimpleDiGraph{T}}}) where {T} = SimpleDiGraphEdge{T
32
32
eit:: SimpleEdgeIter{G} , state= (one (eltype (eit. g)), 1 )
33
33
) where {G <: AbstractSimpleGraph ; ! IsDirected{G}}
34
34
g = eit. g
35
- fadjlist = fadj (g)
36
35
T = eltype (g)
37
36
n = T (nv (g))
38
37
u, i = state
39
38
40
39
@inbounds while u < n
41
- list_u = fadjlist[u]
40
+ list_u = fadj (g, u)
42
41
if i > length (list_u)
43
42
u += one (u)
44
- i = searchsortedfirst (fadjlist[u] , u)
43
+ i = searchsortedfirst (fadj (g, u) , u)
45
44
continue
46
45
end
47
46
e = SimpleEdge (u, list_u[i])
48
47
state = (u, i + 1 )
49
48
return e, state
50
49
end
51
50
52
- @inbounds (n == 0 || i > length (fadjlist[n] )) && return nothing
51
+ @inbounds (n == 0 || i > length (fadj (g, n) )) && return nothing
53
52
54
53
e = SimpleEdge (n, n)
55
54
state = (u, i + 1 )
60
59
eit:: SimpleEdgeIter{G} , state= (one (eltype (eit. g)), 1 )
61
60
) where {G <: AbstractSimpleGraph ; IsDirected{G}}
62
61
g = eit. g
63
- fadjlist = fadj (g)
64
62
T = eltype (g)
65
63
n = T (nv (g))
66
64
u, i = state
67
65
68
66
n == 0 && return nothing
69
67
70
68
@inbounds while true
71
- list_u = fadjlist[u]
69
+ list_u = fadj (g, u)
72
70
if i > length (list_u)
73
71
u == n && return nothing
74
72
75
73
u += one (u)
76
- list_u = fadjlist[u]
74
+ list_u = fadj (g, u)
77
75
i = 1
78
76
continue
79
77
end
You can’t perform that action at this time.
0 commit comments