/** * Returns the geometric mean of all the aggregated data. * * @return the geometric mean * @see SummaryStatistics#getGeometricMean() */ public double getGeometricMean() { synchronized (statistics) { return statistics.getGeometricMean(); } }
/** * {@inheritDoc} */ @Override public synchronized double getGeometricMean() { return super.getGeometricMean(); }
/** * {@inheritDoc} */ @Override public synchronized double getGeometricMean() { return super.getGeometricMean(); }
/** * Returns the geometric mean of all the aggregated data. * * @return the geometric mean * @see SummaryStatistics#getGeometricMean() */ public double getGeometricMean() { synchronized (statistics) { return statistics.getGeometricMean(); } }
/** * @see org.apache.commons.math.stat.descriptive.SummaryStatistics#getGeometricMean() */ public synchronized double getGeometricMean() { return super.getGeometricMean(); }
/** * Generates a text report displaying summary statistics from values that * have been added. * @return String with line feeds displaying statistics * @since 1.2 */ @Override public String toString() { StringBuilder outBuffer = new StringBuilder(); String endl = "\n"; outBuffer.append("SummaryStatistics:").append(endl); outBuffer.append("n: ").append(getN()).append(endl); outBuffer.append("min: ").append(getMin()).append(endl); outBuffer.append("max: ").append(getMax()).append(endl); outBuffer.append("mean: ").append(getMean()).append(endl); outBuffer.append("geometric mean: ").append(getGeometricMean()) .append(endl); outBuffer.append("variance: ").append(getVariance()).append(endl); outBuffer.append("sum of squares: ").append(getSumsq()).append(endl); outBuffer.append("standard deviation: ").append(getStandardDeviation()) .append(endl); outBuffer.append("sum of logs: ").append(getSumOfLogs()).append(endl); return outBuffer.toString(); }
/** * Generates a text report displaying summary statistics from values that * have been added. * @return String with line feeds displaying statistics * @since 1.2 */ @Override public String toString() { StringBuffer outBuffer = new StringBuffer(); String endl = "\n"; outBuffer.append("SummaryStatistics:").append(endl); outBuffer.append("n: ").append(getN()).append(endl); outBuffer.append("min: ").append(getMin()).append(endl); outBuffer.append("max: ").append(getMax()).append(endl); outBuffer.append("mean: ").append(getMean()).append(endl); outBuffer.append("geometric mean: ").append(getGeometricMean()) .append(endl); outBuffer.append("variance: ").append(getVariance()).append(endl); outBuffer.append("sum of squares: ").append(getSumsq()).append(endl); outBuffer.append("standard deviation: ").append(getStandardDeviation()) .append(endl); outBuffer.append("sum of logs: ").append(getSumOfLogs()).append(endl); return outBuffer.toString(); }
/** * Generates a text report displaying * summary statistics from values that * have been added. * @return String with line feeds displaying statistics * @since 1.2 */ public String toString() { StringBuffer outBuffer = new StringBuffer(); outBuffer.append("SummaryStatistics:\n"); outBuffer.append("n: " + getN() + "\n"); outBuffer.append("min: " + getMin() + "\n"); outBuffer.append("max: " + getMax() + "\n"); outBuffer.append("mean: " + getMean() + "\n"); outBuffer.append("geometric mean: " + getGeometricMean() + "\n"); outBuffer.append("variance: " + getVariance() + "\n"); outBuffer.append("sum of squares: " + getSumsq() + "\n"); outBuffer.append("standard deviation: " + getStandardDeviation() + "\n"); outBuffer.append("sum of logs: " + getSumOfLogs() + "\n"); return outBuffer.toString(); }
/** * Returns hash code based on values of statistics * @return hash code */ @Override public int hashCode() { int result = 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getMax()); result = result * 31 + MathUtils.hash(getMean()); result = result * 31 + MathUtils.hash(getMin()); result = result * 31 + MathUtils.hash(getN()); result = result * 31 + MathUtils.hash(getSum()); result = result * 31 + MathUtils.hash(getSumsq()); result = result * 31 + MathUtils.hash(getVariance()); return result; }
/** * Returns hash code based on values of statistics * * @return hash code */ public int hashCode() { int result = 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getMax()); result = result * 31 + MathUtils.hash(getMean()); result = result * 31 + MathUtils.hash(getMin()); result = result * 31 + MathUtils.hash(getN()); result = result * 31 + MathUtils.hash(getSum()); result = result * 31 + MathUtils.hash(getSumsq()); result = result * 31 + MathUtils.hash(getVariance()); return result; }
/** * Returns hash code based on values of statistics * @return hash code */ @Override public int hashCode() { int result = 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getGeometricMean()); result = result * 31 + MathUtils.hash(getMax()); result = result * 31 + MathUtils.hash(getMean()); result = result * 31 + MathUtils.hash(getMin()); result = result * 31 + MathUtils.hash(getN()); result = result * 31 + MathUtils.hash(getSum()); result = result * 31 + MathUtils.hash(getSumsq()); result = result * 31 + MathUtils.hash(getVariance()); return result; }
/** * Returns true iff <code>object</code> is a * <code>SummaryStatistics</code> instance and all statistics have the * same values as this. * @param object the object to test equality against. * @return true if object equals this */ @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof SummaryStatistics == false) { return false; } SummaryStatistics stat = (SummaryStatistics)object; return MathUtils.equalsIncludingNaN(stat.getGeometricMean(), getGeometricMean()) && MathUtils.equalsIncludingNaN(stat.getMax(), getMax()) && MathUtils.equalsIncludingNaN(stat.getMean(), getMean()) && MathUtils.equalsIncludingNaN(stat.getMin(), getMin()) && MathUtils.equalsIncludingNaN(stat.getN(), getN()) && MathUtils.equalsIncludingNaN(stat.getSum(), getSum()) && MathUtils.equalsIncludingNaN(stat.getSumsq(), getSumsq()) && MathUtils.equalsIncludingNaN(stat.getVariance(), getVariance()); }
/** * Returns true iff <code>object</code> is a <code>SummaryStatistics</code> * instance and all statistics have the same values as this. * @param object the object to test equality against. * @return true if object equals this */ public boolean equals(Object object) { if (object == this ) { return true; } if (object instanceof SummaryStatistics == false) { return false; } SummaryStatistics stat = (SummaryStatistics) object; return (MathUtils.equals(stat.getGeometricMean(), this.getGeometricMean()) && MathUtils.equals(stat.getMax(), this.getMax()) && MathUtils.equals(stat.getMean(),this.getMean()) && MathUtils.equals(stat.getMin(),this.getMin()) && MathUtils.equals(stat.getN(), this.getN()) && MathUtils.equals(stat.getSum(), this.getSum()) && MathUtils.equals(stat.getSumsq(),this.getSumsq()) && MathUtils.equals(stat.getVariance(),this.getVariance())); }
/** * Returns true iff <code>object</code> is a * <code>SummaryStatistics</code> instance and all statistics have the * same values as this. * @param object the object to test equality against. * @return true if object equals this */ @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof SummaryStatistics == false) { return false; } SummaryStatistics stat = (SummaryStatistics)object; return MathUtils.equals(stat.getGeometricMean(), getGeometricMean()) && MathUtils.equals(stat.getMax(), getMax()) && MathUtils.equals(stat.getMean(), getMean()) && MathUtils.equals(stat.getMin(), getMin()) && MathUtils.equals(stat.getN(), getN()) && MathUtils.equals(stat.getSum(), getSum()) && MathUtils.equals(stat.getSumsq(), getSumsq()) && MathUtils.equals(stat.getVariance(), getVariance()); }
nf.valueToString(lowestValue), nf.valueToString(s .getSum()), nf.valueToString(s.getMean()), nf .valueToString(s.getGeometricMean()), nf .valueToString(s.getStandardDeviation()), nf .valueToString(s.getVariance()));
} else { final SummaryStatistics summaryStats = (SummaryStatistics) s; geometricMean = summaryStats.getGeometricMean(); secondMoment = summaryStats.getSecondMoment(); sumOfSquares = summaryStats.getSumsq();
} else { final SummaryStatistics summaryStats = (SummaryStatistics) s; geometricMean = summaryStats.getGeometricMean(); secondMoment = summaryStats.getSecondMoment(); sumOfSquares = summaryStats.getSumsq();