Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/Fitting.java @ 3127:71484036b6ae
FixA: Moved function instantiation to always have a valid function instance.
flys-artifacts/trunk@4728 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 20 Jun 2012 15:20:44 +0000 |
parents | cbf308f5c41b |
children | 307842cf8d9e |
comparison
equal
deleted
inserted
replaced
3126:fe9be7ccc5e8 | 3127:71484036b6ae |
---|---|
176 catch (MathException me) { | 176 catch (MathException me) { |
177 log.warn(me); | 177 log.warn(me); |
178 return false; | 178 return false; |
179 } | 179 } |
180 | 180 |
181 // This is the paraterized function for a given km. | |
182 instance = function.instantiate(parameters); | |
183 | |
181 if (!checkOutliers) { | 184 if (!checkOutliers) { |
182 break; | 185 break; |
183 } | 186 } |
184 | 187 |
185 inputs.clear(); | 188 inputs.clear(); |
186 | |
187 // This is the paraterized function for a given km. | |
188 instance = function.instantiate(parameters); | |
189 | 189 |
190 for (int i = 0, N = xs.size(); i < N; ++i) { | 190 for (int i = 0, N = xs.size(); i < N; ++i) { |
191 double y = instance.value(xs.getQuick(i)); | 191 double y = instance.value(xs.getQuick(i)); |
192 if (Double.isNaN(y)) { | 192 if (Double.isNaN(y)) { |
193 continue; | 193 continue; |