1 /* A C-callable front-end to the StoGO global-optimization library.
2 -- Steven G. Johnson */
11 typedef double (*objective_func)(int n, const double *x, double *grad,
14 /* search for the global minimum of the function fgrad(n, x, grad, data)
15 inside a simple n-dimensional hyperrectangle.
19 n: dimension of search space (number of decision variables)
21 fgrad: the objective function of the form fgrad(n, x, grad, data),
22 returning the objective function at x, where
23 n: dimension of search space
24 x: pointer to array of length n, point to evaluate
25 grad: if non-NULL, an array of length n which
26 should on return be the gradient d(fgrad)/dx
27 [ if NULL, grad should be ignored ]
28 data: arbitrary data pointer, whose value is the
29 data argument of stogo_minimize
31 data: arbitrary pointer to any auxiliary data needed by fgrad
33 l, u: arrays of length n giving the lower and upper bounds of the
36 maxeval: if nonzero, a maximum number of fgrad evaluations
38 maxtime: if nonzero, a maximum time (in seconds)
42 fmin: the minimum value of the objective function found
44 x: pointer to array of length n, giving the location of the minimum
46 Return value: 0 if no minimum found, 1 otherwise.
50 int stogo_minimize(int n,
51 objective_func fgrad, void *data,
52 double *x, double *fmin,
53 const double *l, const double *u,
54 long int maxeval, double maxtime);
56 extern int stogo_verbose; /* set to nonzero for verbose output */