Skip to content
Prev 18140 / 398502 Next

optim with gradient

G?ran Brostr?m wrote:

            
I am not sure what you mean by doing the heavy calculations in Fortran. But I

guess the errfunc (and gradient) are defined in R and itself call Fortran
code using .Fortran()? That?s already more performant, but also then you
should avoid that optim calls an R function. It completely "destroys" the
performance.
Yes.
I don?t know. Ask Brian. But I think it should be pretty easy to figure out
how to call optim and how optim calls your functions from the header file.

Adrian



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._