# Graph diffusion using nearest neighbors

### Description

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.

### Usage

1 | ```
nearest.neighbors(nodes, graph, k = 1L, ...)
``` |

### Arguments

`nodes` |
a |

`graph` |
an ( |

`k` |
the depth of the nearest neighbor search, e.g. the depth of the graph traversal |

`...` |
additional parameters |

### Value

returns the kNN nodes as list of integer vectors of node indexes

### Author(s)

Simon Dirmeier, simon.dirmeier@gmx.de

### Examples

1 2 3 4 5 6 7 8 |