[PATCH] (issue1754) Increase m index after adding an interpolated result
Wald Commits
scm-commit at wald.intevation.org
Tue Mar 31 15:16:18 CEST 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427807772 -7200
# Node ID 7d86194661c3a7a1bc87ee4cb8bbdf49f1eeb93b
# Parent cd5e0662f75c6adc3fcc2a13cd2839e6052c6289
(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.
diff -r cd5e0662f75c -r 7d86194661c3 artifacts/src/main/java/org/dive4elements/river/artifacts/math/WKmsOperation.java
--- 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]));
More information about the Dive4Elements-commits
mailing list