Mercurial > dive4elements > river
changeset 3125:070b76fbae46
Parameters: Bring binarySearch with epsilon more to source of binarySearch of Collections.
flys-artifacts/trunk@4726 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 20 Jun 2012 14:24:52 +0000 |
parents | 555ed85af32e |
children | fe9be7ccc5e8 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jun 20 12:46:31 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Jun 20 14:24:52 2012 +0000 @@ -1,3 +1,9 @@ +2012-06-20 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/Parameters.java: + Bring binarySearch with epsilon more to source of binarySearch of Collections. + Still not working properly. Why? + 2012-06-20 Felix Wolfsteller <felix.wolfsteller@intevation.de> Avoid problems with corrected Ws in cross-sections; hacky solution,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java Wed Jun 20 12:46:31 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Parameters.java Wed Jun 20 14:24:52 2012 +0000 @@ -164,8 +164,8 @@ TDoubleArrayList column = columns[columnIndex]; int lo = 0, hi = column.size()-1; - while (hi >= lo) { - int mid = (lo + hi) >> 1; + while (lo <= hi) { + int mid = (lo + hi) >>> 1; double v = column.getQuick(mid); if (v < vl) hi = mid - 1; else if (v > vh) lo = mid + 1;