Opt.setXTolAbs

Sets the absolute tolerance for x.

Equivalent in C API: nlopt_set_xtol_abs and nlopt_set_xtol_abs1

Params:

tol = value of tolerance, default determined by enum defaultTol
  1. void setXTolAbs(T tol)
    struct Opt
    void
    setXTolAbs
    (
    T
    )
    (
    ref const T tol
    )
    if (
    isDoubleForeach!T
    )
  2. void setXTolAbs(double tol)

Examples

auto opt = Opt(Algorithm.auglag, 2);

double[] test = [1e-4, 1e-4];

opt.setXTolAbs(test);

assert(opt.getResult() > 0);
auto opt = Opt(Algorithm.auglag, 2);

opt.setXTolAbs(1e-4);

assert(opt.getResult() > 0);

Meta