public static double getUpperBound(final long numSamples, final double theta, final int numSDev,
      final boolean noDataSeen) {
    //in earlier code numSamples was called numSamplesI
    if (noDataSeen) { return 0.0; }
    checkArgs(numSamples, theta, numSDev);
    final double ub = computeApproxBinoUB(numSamples, theta, numSDev);
    final double numSamplesF = numSamples;
    final double est = numSamplesF / theta;
    return (Math.max(est, ub));
  }
public static double getUpperBound ( final long numSamples , final double theta , final int numSDev , final boolean noDataSeen ) { if ( noDataSeen ) { return 0.0 ; } checkArgs ( numSamples , theta , numSDev ) ; final double ub = computeApproxBinoUB ( numSamples , theta , numSDev ) ; final double numSamplesF = numSamples ; final double est = numSamplesF / theta ; return ( Math . max ( est , ub ) ) ; }
Returns the approximate upper bound value
@param numSamples the number of samples in the sample set
@param theta the sampling probability
@param numSDev the number of "standard deviations" from the mean for the tail bounds.
This must be an integer value of 1, 2 or 3.
@param noDataSeen this is normally false. However, in the case where you have zero samples
and a theta &lt; 1.0, this flag enables the distinction between a virgin case when no actual
data has been seen and the case where the estimate may be zero but an upper error bound may
still exist.
@return the approximate upper bound value