[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Necessity of providing f, df, _and_ fdf?

From: Liam Healy
Subject: [Help-gsl] Necessity of providing f, df, _and_ fdf?
Date: Mon, 19 Jan 2009 18:20:56 -0500

For the multidimensional minimizer and root finder with derivatives
there are three functions f, df, and fdf that are all presumably
required.  I can see that in some cases it would be advantageous to
compute f and df together, but sometimes they are just as easily
computed separately.  In any case, either f and df, or fdf would be
provided.  However, the manual doesn't really say, but implies, that
all three must be provided (at least the examples provide all three).
Is possible to change GSL to allow f & df _or_ fdf instead of "and",
say providing a null pointer for the unneeded function.  If that's
already the case, can the documentation be made clear?

In a related puzzle, I find this statement about fdf hard to understand:
"This function provides an optimization of the separate functions for
f(x) and g(x)—it is always faster to compute the function and its
derivative at the same time. "
The user is providing the function, so whether it's an optimization or
not depends on how it's written.  It seems like an overstatement that
it's "always" faster to compute the function and its derivative at the
same time; I'm willing to believe it's (essentially) at least as fast


reply via email to

[Prev in Thread] Current Thread [Next in Thread]