code: public static <P> NearestNeighbor<P> kdtree( KdTreeDistance<P> distance , int maxNodesSearched ) {
  		return new KdTreeNearestNeighbor<P>(new KdTreeSearch1Bbf<>(distance,maxNodesSearched),
  				new KdTreeSearchNBbf<>(distance,maxNodesSearched),new AxisSplitterMedian<>(distance));
  	}
docs: Performs an approximate {@link NearestNeighbor} search using K-D tree.  Node are searched in Best-Bin-First
  order.  Distance measure is Euclidean squared.
  
  @see KdTreeNearestNeighbor
  @see KdTreeSearch1Bbf
  @see AxisSplitterMedian
  
  @param maxNodesSearched Maximum number of nodes it will search.  Controls speed and accuracy.
  @param <P> Point type.
  @param distance Specifies how distance is computed between two points.
  @return {@link NearestNeighbor} implementation