From cad6466134c20bbe4e66e1c29340e6bccaa79d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4ger?= Date: Mon, 8 Jul 2024 17:33:27 +0200 Subject: [PATCH] Fix nlopt_algorithm_name --- src/api/general.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/general.c b/src/api/general.c index 51caa0ed..c4ca27eb 100644 --- a/src/api/general.c +++ b/src/api/general.c @@ -46,11 +46,9 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = { #ifdef NLOPT_CXX "StoGO (global, derivative-based)", "StoGO with randomized search (global, derivative-based)", - "AGS (global, no-derivative)" #else "StoGO (NOT COMPILED)", "StoGO randomized (NOT COMPILED)", - "AGS (NOT COMPILED)" #endif "original L-BFGS code by Nocedal et al. (NOT COMPILED)", "Limited-memory BFGS (L-BFGS) (local, derivative-based)", @@ -85,6 +83,11 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = { "Sequential Quadratic Programming (SQP) (local, derivative)", "CCSA (Conservative Convex Separable Approximations) with simple quadratic approximations (local, derivative)", "ESCH evolutionary strategy", +#ifdef NLOPT_CXX + "AGS (global, no-derivative)", +#else + "AGS (NOT COMPILED)", +#endif }; const char *NLOPT_STDCALL nlopt_algorithm_name(nlopt_algorithm a)