Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQRelationCalculation.java @ 6797:e237a83fd87d
S/Q relation: Spell Ferguson with F.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 18:29:08 +0200 |
parents | 978ab716a15e |
children | 330ea2915168 |
comparison
equal
deleted
inserted
replaced
6796:978ab716a15e | 6797:e237a83fd87d |
---|---|
40 | 40 |
41 public static final String [] EXTRA_PARAMETERS = { | 41 public static final String [] EXTRA_PARAMETERS = { |
42 "chi_sqr", | 42 "chi_sqr", |
43 "std_dev", | 43 "std_dev", |
44 "max_q", | 44 "max_q", |
45 "c_perguson", | 45 "c_ferguson", |
46 "c_duan", | 46 "c_duan", |
47 "r2" | 47 "r2" |
48 }; | 48 }; |
49 | 49 |
50 protected String river; | 50 protected String river; |
292 } | 292 } |
293 } | 293 } |
294 return Math.max(0d, max); | 294 return Math.max(0d, max); |
295 } | 295 } |
296 | 296 |
297 private double cPerguson( | 297 private double cFerguson( |
298 org.dive4elements.river.artifacts.math.Function instance, | 298 org.dive4elements.river.artifacts.math.Function instance, |
299 SQ [] sqs | 299 SQ [] sqs |
300 ) { | 300 ) { |
301 double sqrSum = 0d; | 301 double sqrSum = 0d; |
302 | 302 |
382 // We need to instantiate the function to calculate | 382 // We need to instantiate the function to calculate |
383 // the remaining values. | 383 // the remaining values. |
384 org.dive4elements.river.artifacts.math.Function f = | 384 org.dive4elements.river.artifacts.math.Function f = |
385 function.instantiate(coeffs); | 385 function.instantiate(coeffs); |
386 | 386 |
387 parameters.set(row, "c_perguson", cPerguson(f, measurements)); | 387 parameters.set(row, "c_ferguson", cFerguson(f, measurements)); |
388 parameters.set(row, "c_duan", cDuan(f, measurements)); | 388 parameters.set(row, "c_duan", cDuan(f, measurements)); |
389 parameters.set(row, "r2", r2(f, measurements)); | 389 parameters.set(row, "r2", r2(f, measurements)); |
390 | 390 |
391 return parameters; | 391 return parameters; |
392 } | 392 } |