public static double calcRadius(int start,int end,int[] instList,Instances insts,Instance pivot,DistanceFunction distanceFunction) throws Exception {
  double radius=Double.NEGATIVE_INFINITY;
  for (int i=start; i <= end; i++) {
    double dist=distanceFunction.distance(pivot,insts.instance(instList[i]),Double.POSITIVE_INFINITY);
    if (dist > radius)     radius=dist;
  }
  return Math.sqrt(radius);
}

public static double calcRadius ( int start , int end , int [ ] instList , Instances insts , Instance pivot , DistanceFunction distanceFunction ) throws Exception { double radius = Double . NEGATIVE_INFINITY ; for ( int i = start ; i <= end ; i ++ ) { double dist = distanceFunction . distance ( pivot , insts . instance ( instList [ i ] ) , Double . POSITIVE_INFINITY ) ; if ( dist > radius ) radius = dist ; } return Math . sqrt ( radius ) ; }
calculates the radius of a node .
