You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we could make use of Graphs.neighborhood_dists to create a more general function for outputting the vertices that are the k-nearest neighbors of a specified vertex, for example:
functionk_nearest_neighbors(g::AbstractGraph, v, d)
nds =neighborhood_dists(g, v, d)
# Filter `nds` for vertices with distances equal to `d`end
Then next_nearest_neighbors(g, v) = k_nearest_neighbors(g, v, 2).
leburgel
changed the title
This would be nice functionality to have, and is worth splitting off into a separate function (next_nearest_neighbors?).
Implement next_nearest_neighbors.
Dec 21, 2022
It looks like we could make use of Graphs.neighborhood_dists to create a more general function for outputting the vertices that are the k-nearest neighbors of a specified vertex, for example:
Then
next_nearest_neighbors(g, v) = k_nearest_neighbors(g, v, 2)
.Originally posted by @mtfishman in #18 (comment)
The text was updated successfully, but these errors were encountered: