Skip to main content

GetPounceOptionType

Function GetPounceOptionType 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn GetPounceOptionType( ipopt_problem: IpoptProblem, keyword: *const c_char, ) -> c_int
Expand description

Which AddIpopt*Option setter a keyword expects.

Returns a PounceOptionType discriminant: 0 when the keyword is not registered in this build, 1 number, 2 integer, 3 string. Lets a caller forwarding options from an untyped source pick the setter from pounce’s registry instead of from the value’s own type — the difference between tol: 1 reaching the solver as 1.0 and being refused as an integer.

ipopt_problem may be NULL: option types are a property of the build, not of a problem, and a caller deciding how to forward options may not have created one yet (code generators, in particular, have no handle at all).

§Safety

ipopt_problem must be a valid IpoptProblem or NULL. keyword, when non-NULL, must be a NUL-terminated C string.