chiark / gitweb /
fe9b8b8ba9ed86647850d26ffca6d8a7a9724573
[nlopt.git] / luksan / luksan.h
1 #ifndef LUKSAN_H
2 #define LUKSAN_H
3
4 #include <nlopt.h>
5 #include <nlopt-util.h>
6
7 #ifdef __cplusplus
8 extern "C"
9 {
10 #endif /* __cplusplus */
11
12 nlopt_result luksan_plis(int n, nlopt_func f, void *f_data,
13                   const double *lb, const double *ub, /* bounds */
14                   double *x, /* in: initial guess, out: minimizer */
15                   double *minf,
16                   nlopt_stopping *stop);
17
18 nlopt_result luksan_plip(int n, nlopt_func f, void *f_data,
19                          const double *lb, const double *ub, /* bounds */
20                          double *x, /* in: initial guess, out: minimizer */
21                          double *minf,
22                          nlopt_stopping *stop,
23                          int method);
24
25 nlopt_result luksan_pnet(int n, nlopt_func f, void *f_data,
26                          const double *lb, const double *ub, /* bounds */
27                          double *x, /* in: initial guess, out: minimizer */
28                          double *minf, 
29                          nlopt_stopping *stop,
30                          int mos1, int mos2);
31
32 /*****************************  internal routines *************************/
33
34 /* mssubs.c: */
35 void luksan_mxdcmd__(int *n, int *m, double *a, 
36                      double *x, double *alf, double *y, double *z__);
37 void luksan_mxdrcb__(int *n, int *m, double *a, 
38                      double *b, double *u, double *v, double *x, int *
39                      ix, int *job);
40 void luksan_mxdrcf__(int *n, int *m, double *a, 
41                      double *b, double *u, double *v, double *x, int *
42                      ix, int *job);
43 void luksan_mxdrmm__(int *n, int *m, double *a, 
44                      double *x, double *y);
45 void luksan_mxdrsu__(int *n, int *m, double *a, 
46                      double *b, double *u);
47 void luksan_mxucop__(int *n, double *x, double *y,
48                      int *ix, int *job);
49 void luksan_mxudir__(int *n, double *a, double *x,
50                      double *y, double *z__, int *ix, int *job);
51 void luksan_mxuneg__(int *n, double *x, double *y,
52                      int *ix, int *job);
53 void luksan_mxuzer__(int *n, double *x, int *ix, 
54                      int *job);
55 void luksan_mxvcop__(int *n, double *x, double *y);
56 void luksan_mxvdif__(int *n, double *x, double *y,
57                      double *z__);
58 void luksan_mxvneg__(int *n, double *x, double *y);
59 void luksan_mxvscl__(int *n, double *a, double *x,
60                      double *y);
61 void luksan_mxvset__(int *n, double *a, double *x);
62 double luksan_mxudot__(int *n, double *x, double *y, int *ix,
63                        int *job);
64 double luksan_mxvdot__(int *n, double *x, double *y);
65 void luksan_mxvdir__(int *n, double *a, double *x, 
66                      double *y, double *z__);
67 void luksan_mxdcmu__(int *n, int *m, double *a, 
68                      double *alf, double *x, double *y);
69 void luksan_mxvlin__(int *n, double *a, double *x, 
70                      double *b, double *y, double *z__);
71 void luksan_mxdcmv__(int *n, int *m, double *a, 
72                      double *alf, double *x, double *u, double *bet, 
73                      double *y, double *v);
74 void luksan_mxvsav__(int *n, double *x, double *y);
75 void luksan_mxvine__(int *n, int *ix);
76 double luksan_mxvmax__(int *n, double *x);
77
78 /* pssubs.c: */
79 void luksan_pcbs04__(int *nf, double *x, int *ix, 
80                      double *xl, double *xu, double *eps9, int *kbf);
81 void luksan_ps1l01__(double *r__, double *rp, 
82                      double *f, double *fo, double *fp, double *p, 
83                      double *po, double *pp, double *minf, double *fmax, 
84                      double *rmin, double *rmax, double *tols, double *
85                      tolp, double *par1, double *par2, int *kd, int *ld, 
86                      int *nit, int *kit, int *nred, int *mred, int *
87                      maxst, int *iest, int *inits, int *iters, int *kters, 
88                      int *mes, int *isys);
89 void luksan_pulsp3__(int *n, int *m, int *mf, 
90                      double *xm, double *gr, double *xo, double *go, 
91                      double *r__, double *po, double *sig, int *iterh, 
92                      int *met3);
93 void luksan_pulvp3__(int *n, int *m, double *xm, 
94                      double *xr, double *gr, double *s, double *so, 
95                      double *xo, double *go, double *r__, double *po, 
96                      double *sig, int *iterh, int *met2, int *met3, 
97                      int *met5);
98 void luksan_pyadc0__(int *nf, int *n, double *x, 
99                      int *ix, double *xl, double *xu, int *inew);
100 void luksan_pyfut1__(int *n, double *f, double *
101                      fo, double *umax, double *gmax, double *dmax__, 
102                      double *tolx, double *tolf, double *tolb, double *
103                      tolg, int *kd, int *nit, int *kit, int *mit, int *
104                      nfv, int *mfv, int *nfg, int *mfg, int *ntesx, 
105                      int *mtesx, int *ntesf, int *mtesf, int *ites, 
106                      int *ires1, int *ires2, int *irest, int *iters, 
107                      int *iterm);
108 void luksan_pyrmc0__(int *nf, int *n, int *ix, 
109                      double *g, double *eps8, double *umax, double *gmax, 
110                      double *rmax, int *iold, int *irest);
111 void luksan_pytrcd__(int *nf, double *x, int *ix, 
112                      double *xo, double *g, double *go, double *r__, 
113                      double *f, double *fo, double *p, double *po, 
114                      double *dmax__, int *kbf, int *kd, int *ld, int *
115                      iters);
116 void luksan_pytrcg__(int *nf, int *n, int *ix, 
117                      double *g, double *umax, double *gmax, int *kbf, 
118                      int *iold);
119 void luksan_pytrcs__(int *nf, double *x, int *ix, 
120                      double *xo, double *xl, double *xu, double *g, 
121                      double *go, double *s, double *ro, double *fp, 
122                      double *fo, double *f, double *po, double *p, 
123                      double *rmax, double *eta9, int *kbf);
124 void luksan_pnint1__(double *rl, double *ru, double *fl, 
125                      double *fu, double *pl, double *pu, double *r__, 
126                      int *mode, int *mtyp, int *merr);
127
128 /* Common Block Declarations */
129 typedef struct {
130      int nres, ndec, nin, nit;
131      /* int nfv;   -- now stored in stop->nevals */
132      int nfg, nfh;
133 } stat_common;
134
135 /* number of double variables that can be stored in scratch memory
136    ... it's >= 2007, and this is in the context of scientific computation,
137    so assume that at least 10M are available, and that sizeof(double)==8 */
138 #define MEMAVAIL 1310720
139
140 #ifdef __cplusplus
141 }  /* extern "C" */
142 #endif /* __cplusplus */
143
144 #endif /* LUKSAN_H */