public DoubleArrayList quantileElements(DoubleArrayList phis){
  if (precomputeEpsilon <= 0.0)   return super.quantileElements(phis);
  int quantilesToPrecompute=(int)Utils.epsilonCeiling(1.0 / precomputeEpsilon);
  phis=phis.copy();
  double e=precomputeEpsilon;
  for (int index=phis.size(); --index >= 0; ) {
    double phi=phis.get(index);
    int i=(int)Math.round(((2.0 * phi / e) - 1.0) / 2.0);
    i=Math.min(quantilesToPrecompute - 1,Math.max(0,i));
    double augmentedPhi=(e / 2.0) * (1 + 2 * i);
    phis.set(index,augmentedPhi);
  }
  return super.quantileElements(phis);
}

public DoubleArrayList quantileElements ( DoubleArrayList phis ) { if ( precomputeEpsilon <= 0.0 ) return super . quantileElements ( phis ) ; int quantilesToPrecompute = ( int ) Utils . epsilonCeiling ( 1.0 / precomputeEpsilon ) ; phis = phis . copy ( ) ; double e = precomputeEpsilon ; for ( int index = phis . size ( ) ; -- index >= 0 ; ) { double phi = phis . get ( index ) ; int i = ( int ) Math . round ( ( ( 2.0 * phi / e ) - 1.0 ) / 2.0 ) ; i = Math . min ( quantilesToPrecompute - 1 , Math . max ( 0 , i ) ) ; double augmentedPhi = ( e / 2.0 ) * ( 1 + 2 * i ) ; phis . set ( index , augmentedPhi ) ; } return super . quantileElements ( phis ) ; }
computes the specified quantile elements over the values previously added .
