[Rd] calling optimize/fmin from C code

From: Tamas K Papp <tpapp_at_princeton.edu>
Date: Thu 28 Dec 2006 - 14:46:28 GMT


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



R-devel@r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Dec 29 01:55:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 29 Dec 2006 - 22:31:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.