chiark / gitweb /
rm defunct Nocedal code references (but keep NLOPT_LD_LBFGS_NOCEDAL constant for...
[nlopt.git] / api / optimize.c
index 329c5f98de42863bad7ec8f25eecc91ac8485988..e17187f00444024ce4f787454933f92968e5c210 100644 (file)
@@ -44,10 +44,6 @@ static int my_isnan(double x) { return x != x; }
 
 #include "cdirect.h"
 
-#ifdef WITH_NOCEDAL
-#  include "l-bfgs-b.h"
-#endif
-
 #include "luksan.h"
 
 #include "crs.h"
@@ -537,40 +533,6 @@ static nlopt_result nlopt_optimize_(nlopt_opt opt, double *x, double *minf)
                             step, ni, x, f_bound, opt, &stop, minf);
         }
 
-#ifdef WITH_NOCEDAL
-        case NLOPT_LD_LBFGS_NOCEDAL: {
-             int iret, *nbd = (int *) malloc(sizeof(int) * n);
-             if (!nbd) return NLOPT_OUT_OF_MEMORY;
-             for (i = 0; i < n; ++i) {
-                  int linf = nlopt_isinf(lb[i]) && lb[i] < 0;
-                  int uinf = nlopt_isinf(ub[i]) && ub[i] > 0;
-                  nbd[i] = linf && uinf ? 0 : (uinf ? 1 : (linf ? 3 : 2));
-             }
-             iret = lbfgsb_minimize(ni, f, f_data, x, nbd, lb, ub,
-                                    ni < 5 ? ni : 5, 0.0, stop.ftol_rel, 
-                                    stop.xtol_abs[0] > 0 ? stop.xtol_abs[0]
-                                    : stop.xtol_rel,
-                                    stop.maxeval);
-             free(nbd);
-             if (iret <= 0) {
-                  switch (iret) {
-                      case -1: return NLOPT_INVALID_ARGS;
-                      case -2: default: return NLOPT_FAILURE;
-                  }
-             }
-             else {
-                  *minf = f(n, x, NULL, f_data);
-                  switch (iret) {
-                      case 5: return NLOPT_MAXEVAL_REACHED;
-                      case 2: return NLOPT_XTOL_REACHED;
-                      case 1: return NLOPT_FTOL_REACHED;
-                      default: return NLOPT_SUCCESS;
-                  }
-             }
-             break;
-        }
-#endif
-
         case NLOPT_LD_LBFGS: 
              return luksan_plis(ni, f, f_data, lb, ub, x, minf, 
                                 &stop, opt->vector_storage);