/** * Returns the maximum of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the maximum */ public double getMax() { return maxImpl.getResult(); }
/** * Returns the sum of the values that have been added * @return The sum or <code>Double.NaN</code> if no values have been added */ public double getSum() { return sumImpl.getResult(); }
/** * Returns the sum of the squares of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return The sum of squares */ public double getSumsq() { return sumsqImpl.getResult(); }
/** * Returns the maximum of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the maximum */ public double getMax() { return maxImpl.getResult(); }
/** * Returns the sum of the values that have been added * @return The sum or <code>Double.NaN</code> if no values have been added */ public double getSum() { return sumImpl.getResult(); }
/** * Returns the sum of the logs of the values that have been added. * <p> * Double.NaN is returned if no values have been added.</p> * * @return the sum of logs * @since 1.2 */ public double getSumOfLogs() { return sumLogImpl.getResult(); }
/** * Returns the minimum of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the minimum */ public double getMin() { return minImpl.getResult(); }
/** * Returns the minimum of the values that have been added. * <p> * Double.NaN is returned if no values have been added.</p> * * @return the minimum */ public double getMin() { return minImpl.getResult(); }
/** * Returns the sum of the values that have been added * @return The sum or <code>Double.NaN</code> if no values have been added */ public double getSum() { return sumImpl.getResult(); }
/** * Returns the sum of the squares of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return The sum of squares */ public double getSumsq() { return sumsqImpl.getResult(); }
/** * Returns an array of the results of a statistic. * @param stats univariate statistic array * @return results array */ private double[] getResults(StorelessUnivariateStatistic[] stats) { double[] results = new double[stats.length]; for (int i = 0; i < results.length; ++i) { results[i] = stats[i].getResult(); } return results; }
/** * Returns the sum of the logs of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the sum of logs * @since 1.2 */ public double getSumOfLogs() { return sumLogImpl.getResult(); }
/** * Returns an array of the results of a statistic. * @param stats univariate statistic array * @return results array */ private double[] getResults(StorelessUnivariateStatistic[] stats) { double[] results = new double[stats.length]; for (int i = 0; i < results.length; ++i) { results[i] = stats[i].getResult(); } return results; }
/** * Returns the minimum of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the minimum */ public double getMin() { return minImpl.getResult(); }
/** * Returns the geometric mean of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the geometric mean */ public double getGeometricMean() { return geoMeanImpl.getResult(); }
/** * Returns the sum of the logs of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the sum of logs * @since 1.2 */ public double getSumOfLogs() { return sumLogImpl.getResult(); }
/** * @see org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic#getResult() */ public double getResult() { if (sumOfLogs.getN() > 0) { return Math.exp(sumOfLogs.getResult() / (double) sumOfLogs.getN()); } else { return Double.NaN; } }
/** * {@inheritDoc} */ @Override public double getResult() { if (sumOfLogs.getN() > 0) { return Math.exp(sumOfLogs.getResult() / sumOfLogs.getN()); } else { return Double.NaN; } }
/** * Returns the mean of the values that have been added. * <p> * Double.NaN is returned if no values have been added.</p> * * @return the mean */ public double getMean() { if (mean == meanImpl) { return new Mean(secondMoment).getResult(); } else { return meanImpl.getResult(); } }
/** * {@inheritDoc} */ @Override public double getResult() { if (sumOfLogs.getN() > 0) { return FastMath.exp(sumOfLogs.getResult() / sumOfLogs.getN()); } else { return Double.NaN; } }