search for: r_gcall

Displaying 3 results from an estimated 3 matches for "r_gcall".

Did you mean: r_fcall
2007 Oct 23
0
API for optimization with Simulated annealing
...ed only for internal use in implementation of optim called from R. Using opt_struct in my C code calling samin encounters the following problems: 1. The definition of opt_struct is present inside the file optim.c, thus my source has no access to it. 2. The function genptry uses opt_struct attribute R_gcall of type SEXP which doesn't allow to specify a function writen in C for generating a new candidate point. This should be either an R function or NULL, meaning that the default generating function is used. Hence, a C user has to copy the definition of opt_struct to his code and fill NULL to its...
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
...timgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at optim.c codes at R sites and it's a structure that has bunch of objects such as SEXP R_fcall, SEXP R_gcall, SEXP R_env, double* ndeps, etc. I cannot figure out what it is about. How about fncount, rcount? R-ext.pdf or R help does not explain it in detail. Any comments would help. Thank you. [[alternative HTML version deleted]]
2007 Apr 13
1
Simulated annealing using optim()
I'm preparing some code to compute the optimal geometry of stressed solids. The core of the calculations is the optimization of elastic energy using the simulated annealing method implemented in the R optim() rutine. I've defined a function to compute this "energy" scalar (the fn parameter for optim) and prepared a list with the arrays defining the geometry and the elastic