Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 93a31cfb18c0 |
children | bcbae86ce7b3 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
759 | 759 |
760 | 760 |
761 /** | 761 /** |
762 * Interpolate W and Q values at a given km. | 762 * Interpolate W and Q values at a given km. |
763 */ | 763 */ |
764 public double [][] interpolateWQ(double km, int steps, Calculation errors) { | 764 public double [][] interpolateWQ( |
765 | 765 double km, |
766 int steps, | |
767 Calculation errors | |
768 ) { | |
766 int rowIndex = Collections.binarySearch(rows, new Row(km)); | 769 int rowIndex = Collections.binarySearch(rows, new Row(km)); |
767 | 770 |
768 if (rowIndex >= 0) { // direct row match | 771 if (rowIndex >= 0) { // direct row match |
769 Row row = rows.get(rowIndex); | 772 Row row = rows.get(rowIndex); |
770 return row.interpolateWQ(steps, this, errors); | 773 return row.interpolateWQ(steps, this, errors); |
987 rowBefore = rows.get(before); | 990 rowBefore = rows.get(before); |
988 break; | 991 break; |
989 } | 992 } |
990 } | 993 } |
991 if (rowBefore != null) { | 994 if (rowBefore != null) { |
992 for (int after = rowIndex, R = rows.size(); after < R; after++) { | 995 for (int after = rowIndex, R = rows.size(); |
996 after < R; | |
997 after++ | |
998 ) { | |
993 if (!Double.isNaN(rows.get(after).ws[col])) { | 999 if (!Double.isNaN(rows.get(after).ws[col])) { |
994 rowAfter = rows.get(after); | 1000 rowAfter = rows.get(after); |
995 break; | 1001 break; |
996 } | 1002 } |
997 } | 1003 } |