python-libnest2d 0.1.0__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- include/nlopt.h +348 -0
- include/nlopt.hpp +619 -0
- include/polyclipping/clipper.hpp +406 -0
- lib/cmake/nlopt/NLoptConfig.cmake +20 -0
- lib/cmake/nlopt/NLoptConfigVersion.cmake +12 -0
- lib/cmake/nlopt/NLoptLibraryDepends-release.cmake +19 -0
- lib/cmake/nlopt/NLoptLibraryDepends.cmake +106 -0
- lib/nlopt.lib +0 -0
- lib/pkgconfig/nlopt.pc +12 -0
- lib/polyclipping.lib +0 -0
- pynest2d.cp313-win_amd64.pyd +0 -0
- python_libnest2d-0.1.0.dist-info/METADATA +88 -0
- python_libnest2d-0.1.0.dist-info/RECORD +18 -0
- python_libnest2d-0.1.0.dist-info/WHEEL +5 -0
- python_libnest2d-0.1.0.dist-info/licenses/COPYING.GPL3 +7 -0
- python_libnest2d-0.1.0.dist-info/licenses/LICENSE +165 -0
- python_libnest2d-0.1.0.dist-info/licenses/NOTICE +48 -0
- share/pkgconfig/polyclipping.pc +13 -0
include/nlopt.h
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/* Copyright (c) 2007-2014 Massachusetts Institute of Technology
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
* a copy of this software and associated documentation files (the
|
|
5
|
+
* "Software"), to deal in the Software without restriction, including
|
|
6
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
* the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be
|
|
12
|
+
* included in all copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
#ifndef NLOPT_H
|
|
24
|
+
#define NLOPT_H
|
|
25
|
+
|
|
26
|
+
#include <stddef.h> /* for ptrdiff_t and size_t */
|
|
27
|
+
|
|
28
|
+
/* Change 0 to 1 to use stdcall convention under Win32 */
|
|
29
|
+
#if 0 && (defined(_WIN32) || defined(__WIN32__))
|
|
30
|
+
# if defined(__GNUC__)
|
|
31
|
+
# define NLOPT_STDCALL __attribute__((stdcall))
|
|
32
|
+
# elif defined(_MSC_VER) || defined(_ICC) || defined(_STDCALL_SUPPORTED)
|
|
33
|
+
# define NLOPT_STDCALL __stdcall
|
|
34
|
+
# else
|
|
35
|
+
# define NLOPT_STDCALL
|
|
36
|
+
# endif
|
|
37
|
+
#else
|
|
38
|
+
# define NLOPT_STDCALL
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
/* for Windows compilers, you should add a line
|
|
42
|
+
#define NLOPT_DLL
|
|
43
|
+
when using NLopt from a DLL, in order to do the proper
|
|
44
|
+
Windows importing nonsense. */
|
|
45
|
+
#if defined(NLOPT_DLL) && (defined(_WIN32) || defined(__WIN32__)) && !defined(__LCC__)
|
|
46
|
+
/* annoying Windows syntax for calling functions in a DLL */
|
|
47
|
+
# if defined(NLOPT_DLL_EXPORT)
|
|
48
|
+
# define NLOPT_EXTERN(T) extern __declspec(dllexport) T NLOPT_STDCALL
|
|
49
|
+
# else
|
|
50
|
+
# define NLOPT_EXTERN(T) extern __declspec(dllimport) T NLOPT_STDCALL
|
|
51
|
+
# endif
|
|
52
|
+
#else
|
|
53
|
+
# define NLOPT_EXTERN(T) extern T NLOPT_STDCALL
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#ifdef __cplusplus
|
|
57
|
+
extern "C" {
|
|
58
|
+
#endif /* __cplusplus */
|
|
59
|
+
|
|
60
|
+
typedef double (*nlopt_func) (unsigned n, const double *x,
|
|
61
|
+
double *gradient, /* NULL if not needed */
|
|
62
|
+
void *func_data);
|
|
63
|
+
|
|
64
|
+
typedef void (*nlopt_mfunc) (unsigned m, double *result, unsigned n, const double *x,
|
|
65
|
+
double *gradient, /* NULL if not needed */
|
|
66
|
+
void *func_data);
|
|
67
|
+
|
|
68
|
+
/* A preconditioner, which preconditions v at x to return vpre.
|
|
69
|
+
(The meaning of "preconditioning" is algorithm-dependent.) */
|
|
70
|
+
typedef void (*nlopt_precond) (unsigned n, const double *x, const double *v, double *vpre, void *data);
|
|
71
|
+
|
|
72
|
+
typedef enum {
|
|
73
|
+
/* Naming conventions:
|
|
74
|
+
|
|
75
|
+
NLOPT_{G/L}{D/N}_*
|
|
76
|
+
= global/local derivative/no-derivative optimization,
|
|
77
|
+
respectively
|
|
78
|
+
|
|
79
|
+
*_RAND algorithms involve some randomization.
|
|
80
|
+
|
|
81
|
+
*_NOSCAL algorithms are *not* scaled to a unit hypercube
|
|
82
|
+
(i.e. they are sensitive to the units of x)
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
NLOPT_GN_DIRECT = 0,
|
|
86
|
+
NLOPT_GN_DIRECT_L,
|
|
87
|
+
NLOPT_GN_DIRECT_L_RAND,
|
|
88
|
+
NLOPT_GN_DIRECT_NOSCAL,
|
|
89
|
+
NLOPT_GN_DIRECT_L_NOSCAL,
|
|
90
|
+
NLOPT_GN_DIRECT_L_RAND_NOSCAL,
|
|
91
|
+
|
|
92
|
+
NLOPT_GN_ORIG_DIRECT,
|
|
93
|
+
NLOPT_GN_ORIG_DIRECT_L,
|
|
94
|
+
|
|
95
|
+
NLOPT_GD_STOGO,
|
|
96
|
+
NLOPT_GD_STOGO_RAND,
|
|
97
|
+
|
|
98
|
+
NLOPT_LD_LBFGS,
|
|
99
|
+
|
|
100
|
+
NLOPT_LN_PRAXIS,
|
|
101
|
+
|
|
102
|
+
NLOPT_LD_VAR1,
|
|
103
|
+
NLOPT_LD_VAR2,
|
|
104
|
+
|
|
105
|
+
NLOPT_LD_TNEWTON,
|
|
106
|
+
NLOPT_LD_TNEWTON_RESTART,
|
|
107
|
+
NLOPT_LD_TNEWTON_PRECOND,
|
|
108
|
+
NLOPT_LD_TNEWTON_PRECOND_RESTART,
|
|
109
|
+
|
|
110
|
+
NLOPT_GN_CRS2_LM,
|
|
111
|
+
|
|
112
|
+
NLOPT_GN_MLSL,
|
|
113
|
+
NLOPT_GD_MLSL,
|
|
114
|
+
NLOPT_GN_MLSL_LDS,
|
|
115
|
+
NLOPT_GD_MLSL_LDS,
|
|
116
|
+
|
|
117
|
+
NLOPT_LD_MMA,
|
|
118
|
+
|
|
119
|
+
NLOPT_LN_COBYLA,
|
|
120
|
+
|
|
121
|
+
NLOPT_LN_NEWUOA,
|
|
122
|
+
NLOPT_LN_NEWUOA_BOUND,
|
|
123
|
+
|
|
124
|
+
NLOPT_LN_NELDERMEAD,
|
|
125
|
+
NLOPT_LN_SBPLX,
|
|
126
|
+
|
|
127
|
+
NLOPT_LN_AUGLAG,
|
|
128
|
+
NLOPT_LD_AUGLAG,
|
|
129
|
+
NLOPT_LN_AUGLAG_EQ,
|
|
130
|
+
NLOPT_LD_AUGLAG_EQ,
|
|
131
|
+
|
|
132
|
+
NLOPT_LN_BOBYQA,
|
|
133
|
+
|
|
134
|
+
NLOPT_GN_ISRES,
|
|
135
|
+
|
|
136
|
+
/* new variants that require local_optimizer to be set,
|
|
137
|
+
not with older constants for backwards compatibility */
|
|
138
|
+
NLOPT_AUGLAG,
|
|
139
|
+
NLOPT_AUGLAG_EQ,
|
|
140
|
+
NLOPT_G_MLSL,
|
|
141
|
+
NLOPT_G_MLSL_LDS,
|
|
142
|
+
|
|
143
|
+
NLOPT_LD_SLSQP,
|
|
144
|
+
|
|
145
|
+
NLOPT_LD_CCSAQ,
|
|
146
|
+
|
|
147
|
+
NLOPT_GN_ESCH,
|
|
148
|
+
|
|
149
|
+
NLOPT_GN_AGS,
|
|
150
|
+
|
|
151
|
+
NLOPT_NUM_ALGORITHMS /* not an algorithm, just the number of them */
|
|
152
|
+
} nlopt_algorithm;
|
|
153
|
+
|
|
154
|
+
NLOPT_EXTERN(const char *) nlopt_algorithm_name(nlopt_algorithm a);
|
|
155
|
+
|
|
156
|
+
/* nlopt_algorithm enum <-> string conversion */
|
|
157
|
+
NLOPT_EXTERN(const char *) nlopt_algorithm_to_string(nlopt_algorithm algorithm);
|
|
158
|
+
NLOPT_EXTERN(nlopt_algorithm) nlopt_algorithm_from_string(const char *name);
|
|
159
|
+
|
|
160
|
+
typedef enum {
|
|
161
|
+
NLOPT_FAILURE = -1, /* generic failure code */
|
|
162
|
+
NLOPT_INVALID_ARGS = -2,
|
|
163
|
+
NLOPT_OUT_OF_MEMORY = -3,
|
|
164
|
+
NLOPT_ROUNDOFF_LIMITED = -4,
|
|
165
|
+
NLOPT_FORCED_STOP = -5,
|
|
166
|
+
NLOPT_NUM_FAILURES = -6, /* not a result, just the number of possible failures */
|
|
167
|
+
NLOPT_SUCCESS = 1, /* generic success code */
|
|
168
|
+
NLOPT_STOPVAL_REACHED = 2,
|
|
169
|
+
NLOPT_FTOL_REACHED = 3,
|
|
170
|
+
NLOPT_XTOL_REACHED = 4,
|
|
171
|
+
NLOPT_MAXEVAL_REACHED = 5,
|
|
172
|
+
NLOPT_MAXTIME_REACHED = 6,
|
|
173
|
+
NLOPT_NUM_RESULTS /* not a result, just the number of possible successes */
|
|
174
|
+
} nlopt_result;
|
|
175
|
+
|
|
176
|
+
/* nlopt_result enum <-> string conversion */
|
|
177
|
+
NLOPT_EXTERN(const char *) nlopt_result_to_string(nlopt_result algorithm);
|
|
178
|
+
NLOPT_EXTERN(nlopt_result) nlopt_result_from_string(const char *name);
|
|
179
|
+
|
|
180
|
+
#define NLOPT_MINF_MAX_REACHED NLOPT_STOPVAL_REACHED
|
|
181
|
+
|
|
182
|
+
NLOPT_EXTERN(void) nlopt_srand(unsigned long seed);
|
|
183
|
+
NLOPT_EXTERN(void) nlopt_srand_time(void);
|
|
184
|
+
|
|
185
|
+
NLOPT_EXTERN(void) nlopt_version(int *major, int *minor, int *bugfix);
|
|
186
|
+
|
|
187
|
+
/*************************** OBJECT-ORIENTED API **************************/
|
|
188
|
+
/* The style here is that we create an nlopt_opt "object" (an opaque pointer),
|
|
189
|
+
then set various optimization parameters, and then execute the
|
|
190
|
+
algorithm. In this way, we can add more and more optimization parameters
|
|
191
|
+
(including algorithm-specific ones) without breaking backwards
|
|
192
|
+
compatibility, having functions with zillions of parameters, or
|
|
193
|
+
relying non-reentrantly on global variables.*/
|
|
194
|
+
|
|
195
|
+
struct nlopt_opt_s; /* opaque structure, defined internally */
|
|
196
|
+
typedef struct nlopt_opt_s *nlopt_opt;
|
|
197
|
+
|
|
198
|
+
/* the only immutable parameters of an optimization are the algorithm and
|
|
199
|
+
the dimension n of the problem, since changing either of these could
|
|
200
|
+
have side-effects on lots of other parameters */
|
|
201
|
+
NLOPT_EXTERN(nlopt_opt) nlopt_create(nlopt_algorithm algorithm, unsigned n);
|
|
202
|
+
NLOPT_EXTERN(void) nlopt_destroy(nlopt_opt opt);
|
|
203
|
+
NLOPT_EXTERN(nlopt_opt) nlopt_copy(const nlopt_opt opt);
|
|
204
|
+
|
|
205
|
+
NLOPT_EXTERN(nlopt_result) nlopt_optimize(nlopt_opt opt, double *x, double *opt_f);
|
|
206
|
+
|
|
207
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_min_objective(nlopt_opt opt, nlopt_func f, void *f_data);
|
|
208
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_max_objective(nlopt_opt opt, nlopt_func f, void *f_data);
|
|
209
|
+
|
|
210
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_precond_min_objective(nlopt_opt opt, nlopt_func f, nlopt_precond pre, void *f_data);
|
|
211
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_precond_max_objective(nlopt_opt opt, nlopt_func f, nlopt_precond pre, void *f_data);
|
|
212
|
+
|
|
213
|
+
NLOPT_EXTERN(nlopt_algorithm) nlopt_get_algorithm(const nlopt_opt opt);
|
|
214
|
+
NLOPT_EXTERN(unsigned) nlopt_get_dimension(const nlopt_opt opt);
|
|
215
|
+
|
|
216
|
+
NLOPT_EXTERN(const char *) nlopt_get_errmsg(nlopt_opt opt);
|
|
217
|
+
|
|
218
|
+
/* generic algorithm parameters: */
|
|
219
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_param(nlopt_opt opt, const char *name, double val);
|
|
220
|
+
NLOPT_EXTERN(double) nlopt_get_param(const nlopt_opt opt, const char *name, double defaultval);
|
|
221
|
+
NLOPT_EXTERN(int) nlopt_has_param(const nlopt_opt opt, const char *name);
|
|
222
|
+
NLOPT_EXTERN(unsigned) nlopt_num_params(const nlopt_opt opt);
|
|
223
|
+
NLOPT_EXTERN(const char *) nlopt_nth_param(const nlopt_opt opt, unsigned n);
|
|
224
|
+
|
|
225
|
+
/* constraints: */
|
|
226
|
+
|
|
227
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_lower_bounds(nlopt_opt opt, const double *lb);
|
|
228
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_lower_bounds1(nlopt_opt opt, double lb);
|
|
229
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_lower_bound(nlopt_opt opt, int i, double lb);
|
|
230
|
+
NLOPT_EXTERN(nlopt_result) nlopt_get_lower_bounds(const nlopt_opt opt, double *lb);
|
|
231
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_upper_bounds(nlopt_opt opt, const double *ub);
|
|
232
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_upper_bounds1(nlopt_opt opt, double ub);
|
|
233
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_upper_bound(nlopt_opt opt, int i, double ub);
|
|
234
|
+
NLOPT_EXTERN(nlopt_result) nlopt_get_upper_bounds(const nlopt_opt opt, double *ub);
|
|
235
|
+
|
|
236
|
+
NLOPT_EXTERN(nlopt_result) nlopt_remove_inequality_constraints(nlopt_opt opt);
|
|
237
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_inequality_constraint(nlopt_opt opt, nlopt_func fc, void *fc_data, double tol);
|
|
238
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_precond_inequality_constraint(nlopt_opt opt, nlopt_func fc, nlopt_precond pre, void *fc_data, double tol);
|
|
239
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_inequality_mconstraint(nlopt_opt opt, unsigned m, nlopt_mfunc fc, void *fc_data, const double *tol);
|
|
240
|
+
|
|
241
|
+
NLOPT_EXTERN(nlopt_result) nlopt_remove_equality_constraints(nlopt_opt opt);
|
|
242
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_equality_constraint(nlopt_opt opt, nlopt_func h, void *h_data, double tol);
|
|
243
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_precond_equality_constraint(nlopt_opt opt, nlopt_func h, nlopt_precond pre, void *h_data, double tol);
|
|
244
|
+
NLOPT_EXTERN(nlopt_result) nlopt_add_equality_mconstraint(nlopt_opt opt, unsigned m, nlopt_mfunc h, void *h_data, const double *tol);
|
|
245
|
+
|
|
246
|
+
/* stopping criteria: */
|
|
247
|
+
|
|
248
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_stopval(nlopt_opt opt, double stopval);
|
|
249
|
+
NLOPT_EXTERN(double) nlopt_get_stopval(const nlopt_opt opt);
|
|
250
|
+
|
|
251
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_ftol_rel(nlopt_opt opt, double tol);
|
|
252
|
+
NLOPT_EXTERN(double) nlopt_get_ftol_rel(const nlopt_opt opt);
|
|
253
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_ftol_abs(nlopt_opt opt, double tol);
|
|
254
|
+
NLOPT_EXTERN(double) nlopt_get_ftol_abs(const nlopt_opt opt);
|
|
255
|
+
|
|
256
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_xtol_rel(nlopt_opt opt, double tol);
|
|
257
|
+
NLOPT_EXTERN(double) nlopt_get_xtol_rel(const nlopt_opt opt);
|
|
258
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_xtol_abs1(nlopt_opt opt, double tol);
|
|
259
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_xtol_abs(nlopt_opt opt, const double *tol);
|
|
260
|
+
NLOPT_EXTERN(nlopt_result) nlopt_get_xtol_abs(const nlopt_opt opt, double *tol);
|
|
261
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_x_weights1(nlopt_opt opt, double w);
|
|
262
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_x_weights(nlopt_opt opt, const double *w);
|
|
263
|
+
NLOPT_EXTERN(nlopt_result) nlopt_get_x_weights(const nlopt_opt opt, double *w);
|
|
264
|
+
|
|
265
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_maxeval(nlopt_opt opt, int maxeval);
|
|
266
|
+
NLOPT_EXTERN(int) nlopt_get_maxeval(const nlopt_opt opt);
|
|
267
|
+
|
|
268
|
+
NLOPT_EXTERN(int) nlopt_get_numevals(const nlopt_opt opt);
|
|
269
|
+
|
|
270
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_maxtime(nlopt_opt opt, double maxtime);
|
|
271
|
+
NLOPT_EXTERN(double) nlopt_get_maxtime(const nlopt_opt opt);
|
|
272
|
+
|
|
273
|
+
NLOPT_EXTERN(nlopt_result) nlopt_force_stop(nlopt_opt opt);
|
|
274
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_force_stop(nlopt_opt opt, int val);
|
|
275
|
+
NLOPT_EXTERN(int) nlopt_get_force_stop(const nlopt_opt opt);
|
|
276
|
+
|
|
277
|
+
/* more algorithm-specific parameters */
|
|
278
|
+
|
|
279
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_local_optimizer(nlopt_opt opt, const nlopt_opt local_opt);
|
|
280
|
+
|
|
281
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_population(nlopt_opt opt, unsigned pop);
|
|
282
|
+
NLOPT_EXTERN(unsigned) nlopt_get_population(const nlopt_opt opt);
|
|
283
|
+
|
|
284
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_vector_storage(nlopt_opt opt, unsigned dim);
|
|
285
|
+
NLOPT_EXTERN(unsigned) nlopt_get_vector_storage(const nlopt_opt opt);
|
|
286
|
+
|
|
287
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_default_initial_step(nlopt_opt opt, const double *x);
|
|
288
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_initial_step(nlopt_opt opt, const double *dx);
|
|
289
|
+
NLOPT_EXTERN(nlopt_result) nlopt_set_initial_step1(nlopt_opt opt, double dx);
|
|
290
|
+
NLOPT_EXTERN(nlopt_result) nlopt_get_initial_step(const nlopt_opt opt, const double *x, double *dx);
|
|
291
|
+
|
|
292
|
+
/* the following are functions mainly designed to be used internally
|
|
293
|
+
by the Fortran and SWIG wrappers, allow us to tel nlopt_destroy and
|
|
294
|
+
nlopt_copy to do something to the f_data pointers (e.g. free or
|
|
295
|
+
duplicate them, respectively) */
|
|
296
|
+
typedef void *(*nlopt_munge) (void *p);
|
|
297
|
+
NLOPT_EXTERN(void) nlopt_set_munge(nlopt_opt opt, nlopt_munge munge_on_destroy, nlopt_munge munge_on_copy);
|
|
298
|
+
typedef void *(*nlopt_munge2) (void *p, void *data);
|
|
299
|
+
NLOPT_EXTERN(void) nlopt_munge_data(nlopt_opt opt, nlopt_munge2 munge, void *data);
|
|
300
|
+
|
|
301
|
+
/*************************** DEPRECATED API **************************/
|
|
302
|
+
/* The new "object-oriented" API is preferred, since it allows us to
|
|
303
|
+
gracefully add new features and algorithm-specific options in a
|
|
304
|
+
re-entrant way, and we can automatically assume reasonable defaults
|
|
305
|
+
for unspecified parameters. */
|
|
306
|
+
|
|
307
|
+
/* Where possible (e.g. for gcc >= 3.1), enable a compiler warning
|
|
308
|
+
for code that uses a deprecated function */
|
|
309
|
+
#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__==3 && __GNUC_MINOR__ > 0))
|
|
310
|
+
# define NLOPT_DEPRECATED __attribute__((deprecated))
|
|
311
|
+
#else
|
|
312
|
+
# define NLOPT_DEPRECATED
|
|
313
|
+
#endif
|
|
314
|
+
|
|
315
|
+
typedef double (*nlopt_func_old) (int n, const double *x, double *gradient, /* NULL if not needed */
|
|
316
|
+
void *func_data);
|
|
317
|
+
|
|
318
|
+
NLOPT_EXTERN(nlopt_result) nlopt_minimize(nlopt_algorithm algorithm, int n, nlopt_func_old f, void *f_data,
|
|
319
|
+
const double *lb, const double *ub, /* bounds */
|
|
320
|
+
double *x, /* in: initial guess, out: minimizer */
|
|
321
|
+
double *minf, /* out: minimum */
|
|
322
|
+
double minf_max, double ftol_rel, double ftol_abs, double xtol_rel, const double *xtol_abs, int maxeval, double maxtime) NLOPT_DEPRECATED;
|
|
323
|
+
|
|
324
|
+
NLOPT_EXTERN(nlopt_result) nlopt_minimize_constrained(nlopt_algorithm algorithm, int n, nlopt_func_old f, void *f_data, int m, nlopt_func_old fc, void *fc_data, ptrdiff_t fc_datum_size,
|
|
325
|
+
const double *lb, const double *ub, /* bounds */
|
|
326
|
+
double *x, /* in: initial guess, out: minimizer */
|
|
327
|
+
double *minf, /* out: minimum */
|
|
328
|
+
double minf_max, double ftol_rel, double ftol_abs, double xtol_rel, const double *xtol_abs, int maxeval, double maxtime) NLOPT_DEPRECATED;
|
|
329
|
+
|
|
330
|
+
NLOPT_EXTERN(nlopt_result) nlopt_minimize_econstrained(nlopt_algorithm algorithm, int n, nlopt_func_old f, void *f_data, int m, nlopt_func_old fc, void *fc_data, ptrdiff_t fc_datum_size, int p, nlopt_func_old h, void *h_data, ptrdiff_t h_datum_size,
|
|
331
|
+
const double *lb, const double *ub, /* bounds */
|
|
332
|
+
double *x, /* in: initial guess, out: minimizer */
|
|
333
|
+
double *minf, /* out: minimum */
|
|
334
|
+
double minf_max, double ftol_rel, double ftol_abs,
|
|
335
|
+
double xtol_rel, const double *xtol_abs, double htol_rel, double htol_abs, int maxeval, double maxtime) NLOPT_DEPRECATED;
|
|
336
|
+
|
|
337
|
+
NLOPT_EXTERN(void) nlopt_get_local_search_algorithm(nlopt_algorithm * deriv, nlopt_algorithm * nonderiv, int *maxeval) NLOPT_DEPRECATED;
|
|
338
|
+
NLOPT_EXTERN(void) nlopt_set_local_search_algorithm(nlopt_algorithm deriv, nlopt_algorithm nonderiv, int maxeval) NLOPT_DEPRECATED;
|
|
339
|
+
|
|
340
|
+
NLOPT_EXTERN(int) nlopt_get_stochastic_population(void) NLOPT_DEPRECATED;
|
|
341
|
+
NLOPT_EXTERN(void) nlopt_set_stochastic_population(int pop) NLOPT_DEPRECATED;
|
|
342
|
+
|
|
343
|
+
/*********************************************************************/
|
|
344
|
+
|
|
345
|
+
#ifdef __cplusplus
|
|
346
|
+
} /* extern "C" */
|
|
347
|
+
#endif /* __cplusplus */
|
|
348
|
+
#endif
|