On 23 December 2014 at 08:21, Hao Ye wrote: | There are also some minima-finding functions in GSL that you may want to look | into. The source for RcppGSL might help with a fully c++ version.
Yes. And there are a bazillion optimisation packages on CRAN: http://cran.r-project.org/web/views/Optimization.html Several of these are already used in a Rcpp context. Also, I once needed something similar to what Avi described here, and just 'ripped out' a simple one-dim optimizer (to compute implied vols for a lot of option price series quickly, so I took the optmizier from QuantLib) -- and blogged about it: http://dirk.eddelbuettel.com/blog/2012/10/25/ This isn't all that hard, and we can probably help Simon here. A different (and harder to grok at first) take is in RcppDE where I reworked the DEoptim optimization package (and "ported" from C to C++ wit RcppArmadillo) and allowed use of user-supplied functions to optimize for -- given as C++ functions. This is likely to confuse Simon now, but some other people have used this scheme. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel