From: stevenj Date: Mon, 5 Apr 2010 01:34:43 +0000 (-0400) Subject: more nlopt_opt introspection X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f58984eac37269d13d80fce02e9bc6e7a054140c;p=nlopt.git more nlopt_opt introspection darcs-hash:20100405013443-c8de0-811bb252f87584b2af1919a53eab9566096b5829.gz --- diff --git a/api/nlopt.h b/api/nlopt.h index 3a91177..6d19f14 100644 --- a/api/nlopt.h +++ b/api/nlopt.h @@ -174,6 +174,9 @@ NLOPT_EXTERN nlopt_result nlopt_optimize(nlopt_opt opt, double *x, NLOPT_EXTERN nlopt_result nlopt_set_min_objective(nlopt_opt opt, nlopt_func f, void *f_data); +NLOPT_EXTERN nlopt_algorithm nlopt_get_algorithm(const nlopt_opt opt); +NLOPT_EXTERN int nlopt_get_dimension(const nlopt_opt opt); + /* constraints: */ NLOPT_EXTERN nlopt_result nlopt_set_lower_bounds(nlopt_opt opt, diff --git a/api/options.c b/api/options.c index 6474c44..50fcfa4 100644 --- a/api/options.c +++ b/api/options.c @@ -344,6 +344,11 @@ GETSET(maxtime, double, maxtime) /*************************************************************************/ +GET(algorithm, nlopt_algorithm, algorithm) +GET(dimension, int, n) + +/*************************************************************************/ + nlopt_result nlopt_set_local_optimizer(nlopt_opt opt, const nlopt_opt local_opt) {