Opt.getUpperBounds

Get upper bounds

Equivalent in C API: nlopt_get_upper_bounds

Params:

ub = storage for output
  1. void getUpperBounds(T ub)
  2. void getUpperBounds(double ub)
    struct Opt
    void
    getUpperBounds
    (
    ref double ub
    )

Examples

import std.algorithm : cmp;

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

double[] ub = [1, 0];
opt.setUpperBounds(ub);

double[] ubNew;
ubNew.length = 2;
opt.getUpperBounds(ubNew);
auto result = cmp(ub[], ubNew[]);

assert(result == 0);

Meta