changeset 7707:cead6df5b7b3

Variance is defined as the sum of squared differences.
author Tom Gottfried <tom.gottfried@intevation.de>
date Wed, 18 Dec 2013 12:39:18 +0100
parents 8f1a5d0802b5
children a4cef1b17b2b
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Wed Dec 18 09:53:44 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Wed Dec 18 12:39:18 2013 +0100
@@ -318,7 +318,7 @@
 
         double sig = 0d;
         for (i = 0; i < size; i++) {
-            sig += ps[i] * Math.exp(phis[i] - phiM);
+            sig += ps[i] * Math.pow((phis[i] - phiM), 2);
         }
         double deviation = Math.sqrt(sig);
         return deviation;

http://dive4elements.wald.intevation.org