Hi. > > Thanks Giles! I was looking in the wrong place. Any suggestions on examples > for these classes (a math function example would be very nice)? I've found > this link (very helpful) but I don't know what to code in the gradient > method. In ParametricUnivariateFunction.value I just returned my function > output with the params as arguments (plus x). For gradient, I'm in a pitch.
And I'm lacking context (sorry, I deleted your previous email from my inbox)... Anyways, the "gradient(double x, double ... parameters)" method should return the partial derivatives with respect to the _parameters_. So, for example: --- public class ParamFuncExample implements ParametricUnivariateFunction { public double value(double x, double ... p) { return p[0] * x + p[1]; } public double[] gradient(double x, double ... p) { return new double[] { x, 1 }; } } --- HTH, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org