@@ -281,9 +281,10 @@ has_edge(g, e) = has_edge(g, src(e), dst(e))
281281Return a list of all neighbors connected to vertex `v` by an incoming edge.
282282
283283### 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:
286286the 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.
287288
288289# Examples
289290```jldoctest
@@ -292,7 +293,7 @@ julia> using Graphs
292293julia> 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]);
293294
294295julia> inneighbors(g, 4)
295- 2-element Vector {Int64}:
296+ 2-element Graphs.FrozenVector {Int64}:
296297 3
297298 5
298299```
@@ -305,9 +306,10 @@ inneighbors(x, v) = _NI("inneighbors")
305306Return a list of all neighbors connected to vertex `v` by an outgoing edge.
306307
307308# 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:
310311the 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.
311313
312314# Examples
313315```jldoctest
@@ -316,7 +318,7 @@ julia> using Graphs
316318julia> 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]);
317319
318320julia> outneighbors(g, 4)
319- 1-element Vector {Int64}:
321+ 1-element Graphs.FrozenVector {Int64}:
320322 5
321323```
322324"""
0 commit comments