@@ -281,9 +281,10 @@ has_edge(g, e) = has_edge(g, src(e), dst(e))
281
281
Return a list of all neighbors connected to vertex `v` by an incoming edge.
282
282
283
283
### Implementation Notes
284
- Returns a reference to the current graph's internal structures, not a copy.
285
- Do not modify result. If the graph is modified, the behavior is undefined:
284
+ In some cases might return a reference to the current graph's internal structures,
285
+ not a copy. Do not modify result. If the graph is modified, the behavior is undefined:
286
286
the array behind this reference may be modified too, but this is not guaranteed.
287
+ If you need to modify the result use `collect` or `copy` to create a copy.
287
288
288
289
# Examples
289
290
```jldoctest
@@ -292,7 +293,7 @@ julia> using Graphs
292
293
julia> g = SimpleDiGraph([0 1 0 0 0; 0 0 1 0 0; 1 0 0 1 0; 0 0 0 0 1; 0 0 0 1 0]);
293
294
294
295
julia> inneighbors(g, 4)
295
- 2-element Vector {Int64}:
296
+ 2-element Graphs.FrozenVector {Int64}:
296
297
3
297
298
5
298
299
```
@@ -305,9 +306,10 @@ inneighbors(x, v) = _NI("inneighbors")
305
306
Return a list of all neighbors connected to vertex `v` by an outgoing edge.
306
307
307
308
# Implementation Notes
308
- Returns a reference to the current graph's internal structures, not a copy.
309
- Do not modify result. If the graph is modified, the behavior is undefined:
309
+ In some cases might return a reference to the current graph's internal structures,
310
+ not a copy. Do not modify result. If the graph is modified, the behavior is undefined:
310
311
the array behind this reference may be modified too, but this is not guaranteed.
312
+ If you need to modify the result use `collect` or `copy` to create a copy.
311
313
312
314
# Examples
313
315
```jldoctest
@@ -316,7 +318,7 @@ julia> using Graphs
316
318
julia> g = SimpleDiGraph([0 1 0 0 0; 0 0 1 0 0; 1 0 0 1 0; 0 0 0 0 1; 0 0 0 1 0]);
317
319
318
320
julia> outneighbors(g, 4)
319
- 1-element Vector {Int64}:
321
+ 1-element Graphs.FrozenVector {Int64}:
320
322
5
321
323
```
322
324
"""
0 commit comments