nlopt
nlopt copied to clipboard
add_ Inequality_ Constraint: Prevent user misuse!
Void add_ Inequality_ Constraint (vfunc vf, void * f_data, double tool=0)
I think void * f_ data can easily cause errors for users, as they may use the same variable to store different data, which is incorrect to add constraints in a loop. Therefore, I suggest implementing a global data area internally to make f_ Data is only used to transfer data and isolate relationships with the outside world.