Revision: 72
http://gridsim.svn.sourceforge.net/gridsim/?rev=72&view=rev
Author: sulistio
Date: 2007-10-17 18:28:20 -0700 (Wed, 17 Oct 2007)
Log Message:
-----------
Fix a bug #1807701 as suggested by Stanislaw Szczepanowski.
Modified Paths:
--------------
trunk/source/gridsim/Accumulator.java
Modified: trunk/source/gridsim/Accumulator.java
===================================================================
--- trunk/source/gridsim/Accumulator.java 2007-10-17 01:14:31 UTC (rev 71)
+++ trunk/source/gridsim/Accumulator.java 2007-10-18 01:28:20 UTC (rev 72)
@@ -4,7 +4,7 @@
* of Parallel and Distributed Systems such as Clusters and Grids
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
*
- * $Id: Accumulator.java,v 1.13 2004/11/01 02:52:33 anthony Exp $
+ * $Id: Accumulator.java,v 1.14 2007/10/18 01:26:48 anthony Exp $
*/
package gridsim;
@@ -132,10 +132,20 @@
* @post $none
*/
public double getStandardDeviation() {
- return sqrMean_ - (mean_ * mean_);
+ return Math.sqrt( this.getVariance() );
}
/**
+ * Calculates the variance of accumulated items
+ * @return the Standard Deviation of accumulated items
+ * @pre $none
+ * @post $none
+ */
+ public double getVariance() {
+ return sqrMean_ - (mean_ * mean_);
+ }
+
+ /**
* Finds the smallest number of accumulated items
* @deprecated As of GridSim 2.1, replaced by {@link #getMin()}
* @return the smallest of accumulated items
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|