@@ -4,13 +4,13 @@ using LightGraphs
4
4
using JLD2
5
5
6
6
import Base:
7
- convert, eltype, show, == , Pair, Tuple, in, copy, length, start, next, done, issubset, zero, one,
7
+ convert, eltype, show, == , Pair, Tuple, in, copy, length, issubset, zero, one,
8
8
size, getindex, setindex!, length, IndexStyle
9
9
10
10
import LightGraphs:
11
- _NI, _insert_and_dedup!, AbstractEdge, AbstractEdgeIter,
11
+ _NI, AbstractEdge, AbstractEdgeIter,
12
12
src, dst, edgetype, nv, ne, vertices, edges, is_directed,
13
- has_vertex, has_edge, in_neighbors, out_neighbors ,
13
+ has_vertex, has_edge, inneighbors, outneighbors ,
14
14
indegree, outdegree, degree, insorted, squash,
15
15
16
16
AbstractGraphFormat, loadgraph, savegraph
@@ -57,7 +57,7 @@ indtype(g::AbstractStaticGraph{T, U}) where T where U = U
57
57
eltype (x:: AbstractStaticGraph ) = vectype (x)
58
58
59
59
function show (io:: IO , g:: AbstractStaticGraph )
60
- dir = is_directed (g)? " directed" : " undirected"
60
+ dir = is_directed (g) ? " directed" : " undirected"
61
61
print (io, " {$(nv (g)) , $(ne (g)) } $dir simple static {$(vectype (g)) , $(indtype (g)) } graph" )
62
62
end
63
63
69
69
70
70
@inline function fadj (g:: AbstractStaticGraph , s:: Integer )
71
71
r = _fvrange (g, s)
72
- return fastview (g. f_vec, r)
72
+ return view (g. f_vec, r)
73
73
end
74
74
75
75
nv (g:: AbstractStaticGraph{T, U} ) where T where U = T (length (g. f_ind) - 1 )
76
76
vertices (g:: AbstractStaticGraph{T, U} ) where T where U = one (T): nv (g)
77
77
78
78
79
79
has_edge (g:: AbstractStaticGraph , e:: AbstractStaticEdge ) =
80
- insorted (dst (e), out_neighbors (g, src (e)))
80
+ insorted (dst (e), outneighbors (g, src (e)))
81
81
82
82
edgetype (g:: AbstractStaticGraph{T} ) where T = StaticEdge{T}
83
83
edges (g:: AbstractStaticGraph ) = StaticEdgeIter (g)
84
84
85
85
has_vertex (g:: AbstractStaticGraph , v:: Integer ) = v in vertices (g)
86
86
87
- out_neighbors (g:: AbstractStaticGraph , v:: Integer ) = fadj (g, v)
88
- in_neighbors (g:: AbstractStaticGraph , v:: Integer ) = badj (g, v)
87
+ outneighbors (g:: AbstractStaticGraph , v:: Integer ) = fadj (g, v)
88
+ inneighbors (g:: AbstractStaticGraph , v:: Integer ) = badj (g, v)
89
89
90
90
zero (g:: T ) where T<: AbstractStaticGraph = T ()
91
91
0 commit comments