What about for C++? I just create the object like this: nlopt::opt(nlopt::algorithm, unsigned n);
inside the loop and is automatically created and destroyed on each iteration? On Fri, Sep 5, 2014 at 8:05 PM, Steven G. Johnson <[email protected]> wrote: > If the number of variables is changing, then you should destroy the > nlopt_opt object (with nlopt_destroy) and create a new one on each loop > iteration. > > On Sep 5, 2014, at 5:49 PM, Miguel Angel Salazar de Troya < > [email protected]> wrote: > > How could I re-use the nl_opt object? I can't create it outside the loop > because I need to know the number of variables, which changes inside the > loop. > > > > _______________________________________________ > NLopt-discuss mailing list > [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss > -- *Miguel Angel Salazar de Troya* Graduate Research Assistant Department of Mechanical Science and Engineering University of Illinois at Urbana-Champaign (217) 550-2360 [email protected]
_______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
