chiark / gitweb /
rm defunct Nocedal code references (but keep NLOPT_LD_LBFGS_NOCEDAL constant for...
authorSteven G. Johnson <stevenj@alum.mit.edu>
Tue, 27 Aug 2013 16:57:31 +0000 (12:57 -0400)
committerSteven G. Johnson <stevenj@alum.mit.edu>
Tue, 27 Aug 2013 16:57:31 +0000 (12:57 -0400)
Makefile.am
api/general.c
api/optimize.c
configure.ac
lbfgs/Makefile.am [deleted file]
lbfgs/README [deleted file]

index dc344e976e5c420ec3d04c0ae11d7a2304846de3..c400475c81c1db00e1103bb823146bde6ba75246 100644 (file)
@@ -8,16 +8,12 @@ CXX_DIRS = stogo
 CXX_LIBS = stogo/libstogo.la
 endif
 
-SUBDIRS = util direct cdirect $(CXX_DIRS) praxis luksan crs mlsl mma cobyla newuoa lbfgs neldermead auglag bobyqa isres slsqp esch api . octave test swig
+SUBDIRS = util direct cdirect $(CXX_DIRS) praxis luksan crs mlsl mma cobyla newuoa neldermead auglag bobyqa isres slsqp esch api . octave test swig
 EXTRA_DIST = autogen.sh nlopt.pc.in m4
 
-if WITH_NOCEDAL
-NOCEDAL_LBFGS=lbfgs/liblbfgs.la
-endif
-
 libnlopt@NLOPT_SUFFIX@_la_SOURCES = 
 libnlopt@NLOPT_SUFFIX@_la_LIBADD = direct/libdirect.la                 \
-cdirect/libcdirect.la $(CXX_LIBS) praxis/libpraxis.la $(NOCEDAL_LBFGS) \
+cdirect/libcdirect.la $(CXX_LIBS) praxis/libpraxis.la \
 luksan/libluksan.la crs/libcrs.la mlsl/libmlsl.la mma/libmma.la                \
 cobyla/libcobyla.la newuoa/libnewuoa.la neldermead/libneldermead.la    \
 auglag/libauglag.la bobyqa/libbobyqa.la isres/libisres.la              \
index 39287f69eb3562ac1f267708983e39afc34d5c45..d1a8d8223056e51b17793a40624ae0c804e1d72d 100644 (file)
@@ -61,11 +61,7 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = {
      "StoGO (NOT COMPILED)",
      "StoGO randomized (NOT COMPILED)",
 #endif
-#ifdef WITH_NOCEDAL_LBFGS
-     "original NON-FREE L-BFGS code by Nocedal et al. (local, deriv.-based)",
-#else
-     "original NON-FREE L-BFGS code by Nocedal et al. (NOT COMPILED)",
-#endif
+     "original L-BFGS code by Nocedal et al. (NOT COMPILED)",
      "Limited-memory BFGS (L-BFGS) (local, derivative-based)",
      "Principal-axis, praxis (local, no-derivative)",
      "Limited-memory variable-metric, rank 1 (local, derivative-based)",
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);
index 2852d27ddd26d1a37e009bcf2f8e209fed0b9f09..b6626fe547bb7009e05d6d26153d5a43ddb79a77 100644 (file)
@@ -94,16 +94,6 @@ if test "$ok" = "yes"; then
 fi
 AC_MSG_RESULT(${ok})
 
-dnl -----------------------------------------------------------------------
-
-if test "x$with_cxx" = xyes; then
-  test -r $srcdir/lbfgs/ap.cpp && test -r $srcdir/lbfgs/ap.h && test -r $srcdir/lbfgs/l-bfgs-b.cpp && test -r $srcdir/lbfgs/l-bfgs-b.h && have_lbfgs=yes
-fi
-AM_CONDITIONAL(WITH_NOCEDAL, test -n "$have_lbfgs")
-if test -n "$have_lbfgs"; then
-   AC_DEFINE(WITH_NOCEDAL, [1], [Define if we have the non-free Nocedal LBFGS code])
-fi
-
 dnl -----------------------------------------------------------------------
 dnl SWIG wrappers
 
@@ -407,7 +397,6 @@ AC_CONFIG_FILES([
    cdirect/Makefile
    stogo/Makefile
    praxis/Makefile
-   lbfgs/Makefile
    luksan/Makefile
    crs/Makefile
    mlsl/Makefile
diff --git a/lbfgs/Makefile.am b/lbfgs/Makefile.am
deleted file mode 100644 (file)
index 42055bb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# non-free, so we cannot distribute with the nlopt library, hence "nodist"
-
-if WITH_NOCEDAL
-noinst_LTLIBRARIES = liblbfgs.la
-endif
-
-nodist_liblbfgs_la_SOURCES = ap.cpp ap.h l-bfgs-b.cpp l-bfgs-b.h
-
-EXTRA_DIST = README
diff --git a/lbfgs/README b/lbfgs/README
deleted file mode 100644 (file)
index 531407d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Limited-memory BFGS code by Ciyou Zhu, Richard Byrd, Peihuang Lu, and
-Jorge Nocedal, which can be found (in various translations) at various
-online sites:
-
-       http://www.alglib.net/optimization/lbfgsb.php
-       http://plato.asu.edu/ftp/other_software/toms778_f90.tar.gz
-
-Unfortunately, since it was published in ACM TOMS, it seems to be
-under the restrictive (semi-free) ACM copyright conditions.  This was
-confirmed in a private email from the author, Prof. Nocedal.
-
-Therefore, we no longer use this code in NLopt.
-
-Fortunately, Prof. Luksan's PLIN.FOR code (see the luksan/ directory)
-is an independent implementation of the same algorithm, and is licensed
-under the LGPL.
-
-UPDATE: Nocedal has apparently gotten permission from ACM to distribute
-       his L-BFGS code under the terms of the GPL:
-
-       http://www.eecs.northwestern.edu/~nocedal/lbfgsb.html
-
-       Therefore, it seems possible to re-incorporate this code into
-       NLopt, and I will look into this for a future release.
-       However, that will put NLopt under the terms of the GPL, so I
-       will need to keep it as an optional package.