10 #endif /* __cplusplus */
12 typedef double (*direct_objective_func)(int n, const double *x,
17 DIRECT_ORIGINAL, DIRECT_GABLONSKY
21 DIRECT_INVALID_BOUNDS = -1,
22 DIRECT_MAXFEVAL_TOOBIG = -2,
23 DIRECT_INIT_FAILED = -3,
24 DIRECT_SAMPLEPOINTS_FAILED = -4,
25 DIRECT_SAMPLE_FAILED = -5,
26 DIRECT_MAXFEVAL_EXCEEDED = 1,
27 DIRECT_MAXITER_EXCEEDED = 2,
28 DIRECT_GLOBAL_FOUND = 3,
31 DIRECT_MAXTIME_EXCEEDED = 6,
33 DIRECT_OUT_OF_MEMORY = -100,
34 DIRECT_INVALID_ARGS = -101,
35 DIRECT_FORCED_STOP = -102
38 #define DIRECT_UNKNOWN_FGLOBAL (-HUGE_VAL)
39 #define DIRECT_UNKNOWN_FGLOBAL_RELTOL (0.0)
41 extern direct_return_code direct_optimize(
42 direct_objective_func f, void *f_data,
44 const double *lower_bounds, const double *upper_bounds,
46 double *x, double *minf,
48 int max_feval, int max_iter,
49 double start, double maxtime,
50 double magic_eps, double magic_eps_abs,
51 double volume_reltol, double sigma_reltol,
55 double fglobal_reltol,
58 direct_algorithm algorithm);
62 #endif /* __cplusplus */