search for: genptry_default

Displaying 1 result from an estimated 1 matches for "genptry_default".

2007 Oct 23
0
API for optimization with Simulated annealing
...optimfn fn, sagenptry *new_candidate, + int maxit, int tmax, double ti, int trace, void *ex); --- R-devel_2007-10-22/src/main/optim.c 2007-08-15 17:50:12.000000000 +0200 +++ R-devel_my_source/src/main/optim.c 2007-10-23 23:02:43.397529120 +0200 @@ -171,6 +171,13 @@ } } +static void genptry_default(int n, double *p, double *ptry, double scale, void *ex) +{ /* default Gaussian Markov kernel */ + int i; + for (i = 0; i < n; i++) + ptry[i] = p[i] + scale * norm_rand(); /* new candidate point */ +} + static void genptry(int n, double *p, double *ptry, double scale, void *ex) {...