I'm not sure with this algorithm, but I'm going to add this test back into the Variance that protects it from returning a value less than 0.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0811c1790b
commit
32fd0d5a52
|
@ -71,7 +71,7 @@ import org.apache.commons.math.FixedDoubleArray;
|
||||||
* @author <a href="mailto:mdiggory@apache.org">Mark Diggory</a>
|
* @author <a href="mailto:mdiggory@apache.org">Mark Diggory</a>
|
||||||
* @author Brent Worden
|
* @author Brent Worden
|
||||||
* @author <a href="mailto:HotFusionMan@Yahoo.com">Albert Davidson Chou</a>
|
* @author <a href="mailto:HotFusionMan@Yahoo.com">Albert Davidson Chou</a>
|
||||||
* @version $Revision: 1.7 $ $Date: 2003/06/16 21:24:30 $
|
* @version $Revision: 1.8 $ $Date: 2003/06/16 21:38:15 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class UnivariateImpl
|
public class UnivariateImpl
|
||||||
|
@ -185,7 +185,7 @@ public class UnivariateImpl
|
||||||
return super.getVariance();
|
return super.getVariance();
|
||||||
}
|
}
|
||||||
|
|
||||||
return variance;
|
return variance < 0 ? 0.0 : variance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue