public KernelDensityEstimator(double[] data,KernelDensityFunction kernel,double epsilon){
  boolean needsort=false;
  for (int i=1; i < data.length; i++) {
    if (data[i - 1] > data[i]) {
      needsort=true;
      break;
    }
  }
  if (needsort) {
    data=data.clone();
    Arrays.sort(data);
  }
  final double min=data[0];
  final double max=data[data.length - 1];
  int windows=1 + (int)(Math.log(data.length));
  process(data,min,max,kernel,windows,epsilon);
}

public KernelDensityEstimator ( double [ ] data , KernelDensityFunction kernel , double epsilon ) { boolean needsort = false ; for ( int i = 1 ; i < data . length ; i ++ ) { if ( data [ i - 1 ] > data [ i ] ) { needsort = true ; break ; } } if ( needsort ) { data = data . clone ( ) ; Arrays . sort ( data ) ; } final double min = data [ 0 ] ; final double max = data [ data . length - 1 ] ; int windows = 1 + ( int ) ( Math . log ( data . length ) ) ; process ( data , min , max , kernel , windows , epsilon ) ; }
process an array of data
