diff --git a/src/lib/GraphsExtensions/src/neighbors.jl b/src/lib/GraphsExtensions/src/neighbors.jl index cb62a29..2e6de9d 100644 --- a/src/lib/GraphsExtensions/src/neighbors.jl +++ b/src/lib/GraphsExtensions/src/neighbors.jl @@ -1,8 +1,8 @@ using Graphs: AbstractGraph, neighborhood_dists function vertices_at_distance(g::AbstractGraph, vertex, distance::Int) - n_dists = neighborhood_dists(g, vertex, distance) - return map(first, filter(==(distance) ∘ last, n_dists)) + vertices_and_distances = neighborhood_dists(g, vertex, distance) + return map(first, filter(==(distance) ∘ last, vertices_and_distances)) end next_nearest_neighbors(g::AbstractGraph, v) = vertices_at_distance(g, v, 2)