import std.algorithm : cmp; auto opt = Opt(Algorithm.auglag, 2); double[] test = [1e-4, 1e-4]; opt.setXTolAbs(test); double[] val = [0, 0]; opt.getXTolAbs(val); auto result = cmp(val[], test[]); assert(result == 0);
import std.algorithm : cmp; auto opt = Opt(Algorithm.auglag, 2); opt.setXTolAbs(1e-4); double[] val = [0, 0]; opt.getXTolAbs(val); double[] test = [1e-4, 1e-4]; auto result = cmp(val[], test[]); assert(result == 0);
Gets the absolute tolerance for x.
Equivalent in C API: nlopt_get_xtol_abs