Opt.setInitialStep

Sets initial step for derivative-free local optimization algorithms.

Equivalent in C API: nlopt_set_initial_step

Params:

dx = Sets the initial step for each dimension
  1. void setInitialStep(T dx)
    struct Opt
    void
    setInitialStep
    (
    T
    )
    (
    ref T dx
    )
    if (
    isDoubleForeach!T
    )
  2. void setInitialStep(double dx)

Examples

auto opt = Opt(Algorithm.lnPraxis, 2);
double[] dx = [0.1, 0.1];
opt.setInitialStep(dx);

assert(opt.getResult() > 0);
auto opt = Opt(Algorithm.lnPraxis, 2);
opt.setInitialStep(0.1);

assert(opt.getResult() > 0);

Meta