[Rd] calling optimize/fmin from C code

Tamas K Papp tpapp at Princeton.EDU
Thu Dec 28 15:46:28 CET 2006


Hi,

To make a calculation (an innermost loop) that uses optimize faster, I
think I should write things in C.  Is it possible to call fmin, which
is called by optimize, from C?  It is not listed in Writing R
extensions, but I found

double Brent_fmin(double ax, double bx, double (*f)(double, void *),
                  void *info, double tol);

in Applic.h.  Is this the function I am looking for?

My guess is that ax and bx are the endpoints, f is the function, but
what is it's second argument (void *)?  What is *info?

Or is it some other function altogether?

Thanks,

Tamas



More information about the R-devel mailing list