Added getSummary method returning StatisticalSummaryValues VO.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b224cbfcff
commit
1ed7683a75
|
@ -22,9 +22,9 @@ import org.apache.commons.discovery.tools.DiscoverClass;
|
|||
/**
|
||||
* Abstract factory class for univariate statistical summaries.
|
||||
*
|
||||
* @version $Revision: 1.3 $ $Date: 2004/04/27 04:37:59 $
|
||||
* @version $Revision: 1.4 $ $Date: 2004/05/18 04:19:53 $
|
||||
*/
|
||||
public abstract class SummaryStatistics implements Serializable, StatisticalSummary{
|
||||
public abstract class SummaryStatistics implements Serializable, StatisticalSummary {
|
||||
|
||||
/**
|
||||
* Create an instance of a <code>SummaryStatistics</code>
|
||||
|
@ -73,6 +73,17 @@ public abstract class SummaryStatistics implements Serializable, StatisticalSumm
|
|||
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());
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the value to the data to be summarized
|
||||
* @param v the value to be added
|
||||
|
|
Loading…
Reference in New Issue