chiark / gitweb /
support both Jones and Gablonsky direct variants
authorstevenj <stevenj@alum.mit.edu>
Fri, 24 Aug 2007 13:37:27 +0000 (09:37 -0400)
committerstevenj <stevenj@alum.mit.edu>
Fri, 24 Aug 2007 13:37:27 +0000 (09:37 -0400)
darcs-hash:20070824133727-c8de0-7bc31c4491e8d18853f961ed48aba7c4c6c3ab77.gz

README
api/nlopt.c
api/nlopt.h
api/nlopt_minimize.3
direct/userguide.pdf [new file with mode: 0644]
direct/userguide.ps.gz [deleted file]

diff --git a/README b/README
index 5bc54fe2da75e5767a215632e4588d205f5a019a..46b4a6a6760fa59f13325a32ccc6a0c99f26dffe 100644 (file)
--- a/README
+++ b/README
@@ -15,4 +15,7 @@ link it with -lnlopt -lm.  You may need to use the C++ compiler to link
 in order to include the C++ libraries (which are used internally by NLopt,
 even though it has a C API).
 
+The minimization function, nlopt_minimize, is described in the man
+page (api/nlopt_minimize.3, which is installed by 'make install'.
+
 Interfaces for other languages may be added in the future.
index 5de528219c6d2920d519a69abae0ea927faa78f4..21089297b2f2f2a0a6efffab63857c476b2a8997 100644 (file)
@@ -6,6 +6,7 @@
 
 static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][128] = {
      "DIRECT (global)",
+     "DIRECT-L (global)",
      "Subplex (local)",
      "StoGO (global)",
      "Low-storage BFGS (LBFGS) (local)"
@@ -74,11 +75,15 @@ nlopt_result nlopt_minimize(
 
      switch (algorithm) {
         case NLOPT_GLOBAL_DIRECT:
+        case NLOPT_GLOBAL_DIRECT_L:
              switch (direct_optimize(f_direct, &d, n, lb, ub, x, fmin,
                                      maxeval, 500, ftol_rel, ftol_abs,
                                      xtol_rel, xtol_rel,
                                      DIRECT_UNKNOWN_FGLOBAL, -1.0,
-                                     NULL, DIRECT_GABLONSKY)) {
+                                     NULL, 
+                                     algorithm == NLOPT_GLOBAL_DIRECT
+                                     ? DIRECT_ORIGINAL
+                                     : DIRECT_GABLONSKY)) {
                  case DIRECT_INVALID_BOUNDS:
                  case DIRECT_MAXFEVAL_TOOBIG:
                  case DIRECT_INVALID_ARGS:
index 60c21a4cf3abfd388c24d818a950f4541c6e93ab..5676706acb839739e7737fd91f4e710f155fb770 100644 (file)
@@ -13,6 +13,7 @@ typedef double (*nlopt_func)(int n, const double *x,
 typedef enum {
      /* non-gradient algorithms */
      NLOPT_GLOBAL_DIRECT = 0,
+     NLOPT_GLOBAL_DIRECT_L,
      NLOPT_LOCAL_SUBPLEX,
 
      /* gradient-based algorithms */
index 7e0aa1726beeaff53797944c044b64e04e9d1d21..e665d1c920e61a67397e1b1c90e14ccf4674328f 100644 (file)
@@ -28,6 +28,9 @@ nlopt_minimize \- Minimize a multivariate nonlinear function
 .BI "                            const double* " "xtol_abs" ,
 .BI "                            int " "maxeval" ,
 .BI "                            double " "maxtime" );
+.sp
+You should link the resulting program with the linker flags
+-lnlopt -lm on Unix.
 .fi
 .SH DESCRIPTION
 .BR nlopt_minimize ()
diff --git a/direct/userguide.pdf b/direct/userguide.pdf
new file mode 100644 (file)
index 0000000..b046c16
Binary files /dev/null and b/direct/userguide.pdf differ
diff --git a/direct/userguide.ps.gz b/direct/userguide.ps.gz
deleted file mode 100644 (file)
index c3a1655..0000000
Binary files a/direct/userguide.ps.gz and /dev/null differ