chiark / gitweb /
added CCSAQ algorithm; internal support for preconditioners (untested) not yet export...
[nlopt.git] / api / nlopt.h
index 7af7b6950546eae2103a4f2d279dbdc547a49499..2ab6ab6534335e487325cc4bc9709be96d3eee90 100644 (file)
@@ -68,6 +68,11 @@ typedef void (*nlopt_mfunc)(unsigned m, double *result,
                             double *gradient, /* NULL if not needed */
                             void *func_data);
 
+/* a preconditioner, which computes the approximate Hessian H(x) at x.
+   In particular, it returns Hdx = H(x) * dx.    [Array lengths = n.] */
+typedef void (*nlopt_precond)(unsigned n, const double *x, const double *dx,
+                             double *Hdx, void *data);
+
 typedef enum {
      /* Naming conventions:
 
@@ -143,6 +148,8 @@ typedef enum {
 
      NLOPT_LD_SLSQP,
 
+     NLOPT_LD_CCSAQ,
+
      NLOPT_NUM_ALGORITHMS /* not an algorithm, just the number of them */
 } nlopt_algorithm;