Last commit got formated with tabs, this is formated with spaces

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark R. Diggory 2003-06-18 13:57:24 +00:00
parent 202a38df83
commit 283716c077
1 changed files with 270 additions and 264 deletions

View File

@ -18,7 +18,7 @@
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This sumLog includes software developed by the
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
@ -71,7 +71,7 @@ import org.apache.commons.math.FixedDoubleArray;
* @author <a href="mailto:mdiggory@apache.org">Mark Diggory</a>
* @author Brent Worden
* @author <a href="mailto:HotFusionMan@Yahoo.com">Albert Davidson Chou</a>
* @version $Revision: 1.10 $ $Date: 2003/06/18 13:47:35 $
* @version $Revision: 1.11 $ $Date: 2003/06/18 13:57:24 $
*
*/
public class UnivariateImpl implements Univariate, Serializable {
@ -326,18 +326,24 @@ public class UnivariateImpl implements Univariate, Serializable {
s4 += v
* (
- 4.0 * s3
+ v * (6.0 * s2 + n1 * (1 + Math.pow((double) n, 3)) * v2));
+ v
* (6.0 * s2
+ n1 * (1 + Math.pow((double) n, 3)) * v2));
s3 += v * (-3.0 * s2 + (double) n * n1 * (n - 2) * Math.pow(v, 2));
s3 += v
* (-3.0 * s2 + (double) n * n1 * (n - 2) * Math.pow(v, 2));
s2 += n1 * dev * v;
mean += v;
variance =
(n <= 1) ? 0.0 : s2 / n1;
variance = (n <= 1) ? 0.0 : s2 / n1;
skewness =
(n <= 2) ? 0.0 : s3 / ((double) n * Math.sqrt(variance) * variance);
(n <= 2)
? 0.0
: s3 / ((double) n * Math.sqrt(variance) * variance);
kurtosis =
(n <= 3) ? 0.0 : s4 / ((double) n * Math.pow(variance, 2)) - 3;
(n <= 3)
? 0.0
: s4 / ((double) n * Math.pow(variance, 2)) - 3;
}
}
}