eliminate typedef in driver::nearest_neighbor