Mercurial > dive4elements > river
changeset 3201:1c00ed73ccf4
FixA: Fixed da/dQ for exp function but the fitting still does not work.
flys-artifacts/trunk@4818 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 27 Jun 2012 16:41:02 +0000 |
parents | 099f18a4e227 |
children | 307842cf8d9e |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/fitting/Exp.java |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jun 27 16:12:32 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Jun 27 16:41:02 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-27 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/math/fitting/Exp.java: + Fixed da/dQ but the fitting still does not work for the function. :-/ + 2012-06-27 Christian Lins <christian.lins@intevation.de> * src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/fitting/Exp.java Wed Jun 27 16:12:32 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/fitting/Exp.java Wed Jun 27 16:41:02 2012 +0000 @@ -38,10 +38,13 @@ } @Override - public double [] gradient(double x, double [] parameters) { + public double [] gradient(double Q, double [] parameters) { + double m = parameters[0]; + double a = parameters[1]; + double b = parameters[2]; return new double [] { - Math.pow(parameters[1], x), - Math.pow(parameters[1], x-1d)*x, + Math.pow(a, Q), + Math.pow(a, Q-1d)*m*Q, 1d }; }