changeset 8649:7d86194661c3

(issue1754) Increase m index after adding an interpolated result. At this point we have added a result for this km of the minuend by interpolating the corresponding s value. So we can take a look at the next KM. Not doing this could lead to duplicated results in this calculation.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 31 Mar 2015 15:16:12 +0200
parents cd5e0662f75c
children dcdccd59c3be
files artifacts/src/main/java/org/dive4elements/river/artifacts/math/WKmsOperation.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/math/WKmsOperation.java	Mon Mar 30 19:29:31 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/math/WKmsOperation.java	Tue Mar 31 15:16:12 2015 +0200
@@ -136,6 +136,7 @@
                         ss[si-1].km, ss[si].km,
                         ss[si-1].w,  ss[si].w);
                     result.add(m.km, m.w - sw);
+                    ++mi;
                 }
                 else { // ss[si].km == m.km
                     result.add(m.km, m.subtract(ss[si]));

http://dive4elements.wald.intevation.org