Understanding kdtree.SearchKNN return value

Hi,

I’m working with PointCloud::RemoveStatisticalOutliers function and I’m trying to understand code behavior.
When I call : kdtree.SearchKNN - in which cases “dist.size” parameters won’t be greater then zero ?
Or since all points in the point cloud are connected by the kdtree geometry “dist” will always return a vector with size greater then zero ?

Thank you,
Maayan .