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 \
"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)",
#include "cdirect.h"
-#ifdef WITH_NOCEDAL
-# include "l-bfgs-b.h"
-#endif
-
#include "luksan.h"
#include "crs.h"
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);
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
cdirect/Makefile
stogo/Makefile
praxis/Makefile
- lbfgs/Makefile
luksan/Makefile
crs/Makefile
mlsl/Makefile
+++ /dev/null
-# 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
+++ /dev/null
-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.