F77_SET(local_optimizer, LOCAL_OPTIMIZER, nlopt_opt)
F77_GETSET(population, POPULATION, unsigned)
-F77_GETSET(subspace_dim, SUBSPACE_DIM, unsigned)
+F77_GETSET(vector_storage, SUBSPACE_DIM, unsigned)
F77_SETA(default_initial_step, DEFAULT_INITIAL_STEP, double)
F77_SETA(initial_step, INITIAL_STEP, double)
}
NLOPT_GETSET(unsigned, population)
- NLOPT_GETSET(unsigned, subspace_dim)
+ NLOPT_GETSET(unsigned, vector_storage)
NLOPT_GETSET_VEC(initial_step)
void set_default_initial_step(const std::vector<double> &x) {
nlopt_opt local_opt; /* local optimizer */
unsigned stochastic_population; /* population size for stochastic algs */
double *dx; /* initial step sizes (length n) for nonderivative algs */
- unsigned subspace_dim; /* max subspace dimension (0 for default) */
+ unsigned vector_storage; /* max subspace dimension (0 for default) */
double *work; /* algorithm-specific workspace during optimization */
};
NLOPT_EXTERN(nlopt_result) nlopt_set_population(nlopt_opt opt, unsigned pop);
NLOPT_EXTERN(unsigned) nlopt_get_population(const nlopt_opt opt);
-NLOPT_EXTERN(nlopt_result) nlopt_set_subspace_dim(nlopt_opt opt, unsigned dim);
-NLOPT_EXTERN(unsigned) nlopt_get_subspace_dim(const nlopt_opt opt);
+NLOPT_EXTERN(nlopt_result) nlopt_set_vector_storage(nlopt_opt opt, unsigned dim);
+NLOPT_EXTERN(unsigned) nlopt_get_vector_storage(const nlopt_opt opt);
NLOPT_EXTERN(nlopt_result) nlopt_set_default_initial_step(nlopt_opt opt,
const double *x);
case NLOPT_LD_LBFGS:
return luksan_plis(ni, f, f_data, lb, ub, x, minf,
- &stop, opt->subspace_dim);
+ &stop, opt->vector_storage);
case NLOPT_LD_VAR1:
case NLOPT_LD_VAR2:
return luksan_plip(ni, f, f_data, lb, ub, x, minf,
- &stop, opt->subspace_dim,
+ &stop, opt->vector_storage,
algorithm == NLOPT_LD_VAR1 ? 1 : 2);
case NLOPT_LD_TNEWTON:
case NLOPT_LD_TNEWTON_PRECOND:
case NLOPT_LD_TNEWTON_PRECOND_RESTART:
return luksan_pnet(ni, f, f_data, lb, ub, x, minf,
- &stop, opt->subspace_dim,
+ &stop, opt->vector_storage,
1 + (algorithm - NLOPT_LD_TNEWTON) % 2,
1 + (algorithm - NLOPT_LD_TNEWTON) / 2);
opt->local_opt = NULL;
opt->stochastic_population = 0;
- opt->subspace_dim = 0;
+ opt->vector_storage = 0;
opt->dx = NULL;
opt->work = NULL;
/*************************************************************************/
GETSET(population, unsigned, stochastic_population)
-GETSET(subspace_dim, unsigned, subspace_dim)
+GETSET(vector_storage, unsigned, vector_storage)
/*************************************************************************/
nlopt_set_maxtime(opt, struct_val_default(opts, "maxtime", 0.0));
nlopt_set_population(opt, struct_val_default(opts, "population", 0));
- nlopt_set_subspace_dim(opt, struct_val_default(opts, "subspace_dim", 0));
+ nlopt_set_vector_storage(opt, struct_val_default(opts, "vector_storage", 0));
if (struct_arrval(opts, "initial_step", n, NULL))
nlopt_set_initial_step(opt,
nlopt_set_maxtime(opt, struct_val_default(opts, "maxtime", 0.0));
nlopt_set_population(opt, struct_val_default(opts, "population", 0));
- nlopt_set_subspace_dim(opt, struct_val_default(opts, "subspace_dim", 0));
+ nlopt_set_vector_storage(opt, struct_val_default(opts, "vector_storage", 0));
if (opts.contains("initial_step")) {
Matrix zeros(1, n, 0.0);
%catches(std::bad_alloc,std::invalid_argument) nlopt::opt::set_local_optimizer(const opt &lo);
GETSET_EXCEPT(population, unsigned)
-GETSET_EXCEPT(subspace_dim, unsigned)
+GETSET_EXCEPT(vector_storage, unsigned)
GETSETVEC_EXCEPT(initial_step)
%catches(std::bad_alloc,std::invalid_argument) nlopt::opt::set_default_initial_step(const std::vector<double> &x);