/** * {@inheritDoc} */ public abstract double evaluate(final double[] values, final int begin, final int length);
/** {@inheritDoc} */ @Override public void setData(final double[] values) { if (values == null) { cachedPivots = null; } else { cachedPivots = new int[(0x1 << MAX_CACHED_LEVELS) - 1]; Arrays.fill(cachedPivots, -1); } super.setData(values); }
/** * Returns the result of evaluating the statistic over the stored data. * <p> * The stored array is the one which was set by previous calls to * </p> * @return the value of the statistic applied to the stored data */ public double evaluate() { return evaluate(storedData); }
return test(values, begin, length);
/** * Computes the confidence 05 interval-factor. This value has to be combined * with the mean to get the confidence-interval. * * @param meter * the meter for the 05-confidence interval factor * @return the 99% confidence */ public final double getConf05(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic conf05 = new Percentile(5.0); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return conf05.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
return test(values, begin, length);
/** * {@inheritDoc} */ public abstract double evaluate(final double[] values, final int begin, final int length);
/** * Returns the arithmetic mean of the result set. avg() is an alias for this * method. * * @param meter * the meter of the mean * @return the mean value. */ public final double mean(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic mean = new Mean(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return mean.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** {@inheritDoc} */ @Override public void setData(final double[] values, final int begin, final int length) { if (values == null) { cachedPivots = null; } else { cachedPivots = new int[(0x1 << MAX_CACHED_LEVELS) - 1]; Arrays.fill(cachedPivots, -1); } super.setData(values, begin, length); }
/** * @see org.apache.commons.math.stat.descriptive.UnivariateStatistic#evaluate(double[], int, int) */ public abstract double evaluate(final double[] values, final int begin, final int length);
/** * Computes the square sum of the elements. * * @param meter * the meter of the mean * @return the square sum. */ public final double squareSum(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic sqrSum = new SumOfSquares(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return sqrSum.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** * Computes the standard deviation. * * @param meter * the meter of the mean * @return the standard deviation */ public final double getStandardDeviation(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic stdDev = new StandardDeviation(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return stdDev.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** * Computes the sum over all data items. * * @param meter * the meter of the mean * @return the sum of all runs. */ public final double sum(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic sum = new Sum(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return sum.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** * Computes the minimum. * * @param meter * the meter of the mean * @return the minimum result value. */ public final double min(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic min = new Min(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return min.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** * Computes the maximum. * * @param meter * the meter of the mean * @return the maximum result value. */ public final double max(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic max = new Max(); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return max.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }
/** * Computes the confidence 95 interval-factor. This value has to be combined * with the mean to get the confidence-interval. * * @param meter * the meter for the 95-confidence interval factor * @return the 95% confidence */ public final double getConf95(final AbstractMeter meter) { checkIfMeterExists(meter); final AbstractUnivariateStatistic conf95 = new Percentile(95.0); final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter)); return conf95.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length); }