libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

Should `prima_get_rc_string` be exposed in the C public API? #188

Open zaikunzhang opened 5 months ago

zaikunzhang commented 5 months ago

Hi @nbelakovski ,

Why do we need prima_get_rc_string in the C public API? Shouldn't it be hidden from the users? We expect the users to get the string from result.message, no?

https://github.com/libprima/prima/blob/da25bfdd47e9c98b7c7f21336a49cfce16f9e038/c/include/prima/prima.h#L77-L79

Thank you for taking a look.

Best regards, Zaikun

jschueller commented 4 weeks ago

I think the point was to hide the implementation of the result struct which could be an opaque struct at some point