commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate SummaryStatistics.java
Date Tue, 18 May 2004 04:19:53 GMT
psteitz     2004/05/17 21:19:53

  Modified:    math/src/java/org/apache/commons/math/stat/univariate
                        SummaryStatistics.java
  Log:
  Added getSummary method returning StatisticalSummaryValues VO.
  
  Revision  Changes    Path
  1.4       +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/SummaryStatistics.java
  
  Index: SummaryStatistics.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/SummaryStatistics.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SummaryStatistics.java	27 Apr 2004 04:37:59 -0000	1.3
  +++ SummaryStatistics.java	18 May 2004 04:19:53 -0000	1.4
  @@ -24,7 +24,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public abstract class SummaryStatistics implements Serializable, StatisticalSummary{
  +public abstract class SummaryStatistics implements Serializable, StatisticalSummary {
   
   	/**
   	 * Create an instance of a <code>SummaryStatistics</code>
  @@ -71,6 +71,17 @@
   			// ignore as default implementation will be used.
   		}
   		return factory;
  +	}
  +	
  +
  +	/**
  +	 * Return a StatisticalSummaryValues instance reporting current statistics.
  +	 * 
  +	 * @return Current values of statistics 
  +	 */
  +	public StatisticalSummary getSummary() {
  +	    return new StatisticalSummaryValues(getMean(), getVariance(), getN(),
  +	            getMax(), getMin(), getSum());
   	}
   	
   	/**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message