Opt.getPopulation

Get population in stochastic search algorithms.

Equivalent in C API: nlopt_get_population

struct Opt
getPopulation
()

Return Value

Type: auto

Size of population

Examples

auto opt = Opt(Algorithm.gnCRS2LM, 2);
opt.setPopulation(100);
auto pop = opt.getPopulation();
assert(pop == 100);

Meta