finds and returns k nearest nodes of a given node.
finds and returns k nearest nodes of a given node. does optimal Xformation before computing distance(rmsd). put the result in nn_idx, and dists arrays. These arrays should have been initialized already.