Add nearest_neighbor and related additions on other interfaces