private double computeStopDistance(List<KNNHeap> heaps){
  double pr_knn_distance=Double.NaN;
  for (  KNNHeap knnList : heaps) {
    double kdist=knnList.getKNNDistance();
    pr_knn_distance=(kdist < pr_knn_distance) ? pr_knn_distance : kdist;
  }
  if (pr_knn_distance != pr_knn_distance) {
    return Double.POSITIVE_INFINITY;
  }
  return pr_knn_distance;
}

private double computeStopDistance ( List < KNNHeap > heaps ) { double pr_knn_distance = Double . NaN ; for ( KNNHeap knnList : heaps ) { double kdist = knnList . getKNNDistance ( ) ; pr_knn_distance = ( kdist < pr_knn_distance ) ? pr_knn_distance : kdist ; } if ( pr_knn_distance != pr_knn_distance ) { return Double . POSITIVE_INFINITY ; } return pr_knn_distance ; }
compute the maximum stop distance .
