Use reverse_nearest_neighbor_num parameter: fix #563

This change fixes #563.