comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/QRangeTree.java @ 4821:bcf25d8c183e

Moved NaN removal code from W to DoubleUtil. Create QKms when calculating the 'Umhuellende'.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 21 Jan 2013 14:03:22 +0100
parents 43e69af28b3c
children 14db045d6368
comparison
equal deleted inserted replaced
4820:26c849cf54e7 4821:bcf25d8c183e
142 if (last != null && last.contains(pos)) { 142 if (last != null && last.contains(pos)) {
143 return last.q; 143 return last.q;
144 } 144 }
145 last = QRangeTree.this.findNode(pos); 145 last = QRangeTree.this.findNode(pos);
146 return last != null ? last.q : Double.NaN; 146 return last != null ? last.q : Double.NaN;
147 }
148
149 public double [] findQs(double [] kms, Calculation report) {
150 return findQs(kms, new double[kms.length], report);
151 }
152
153 public double [] findQs(
154 double [] kms,
155 double [] qs,
156 Calculation report
157 ) {
158 for (int i = 0; i < kms.length; ++i) {
159 if (Double.isNaN(qs[i] = findQ(kms[i]))) {
160 report.addProblem(kms[i], "cannot.find.q");
161 }
162 }
163 return qs;
147 } 164 }
148 } // class QuickQFinder 165 } // class QuickQFinder
149 166
150 protected Node root; 167 protected Node root;
151 168

http://dive4elements.wald.intevation.org