For every node in a set of nodes the graph gets traversed along the node's shortest paths to its neighbors. Nearest neighbors are added until a maximum depth of \(k\) is reached. For settings where there are more than \(k\) neighbors having the same distance, all neighbors are returned.
Arguments
- nodes
a \(n\)-dimensional integer vector of node indexes (1-based) for which the algorithm is applied iteratively
- graph
an (\(n \times n\))-dimensional numeric non-negative adjacence
matrix
(ordgCMatrix
,vector
) representing the graph- k
the depth of the nearest neighbor search, e.g. the depth of the graph traversal
- ...
additional parameters