pounce_common/types.rs
1//! Fundamental scalar types.
2//!
3//! Mirrors `Common/IpTypes.h` and `Common/IpTypes.hpp`. We commit to
4//! `f64` and `i32` for v1.0 because Ipopt's MUMPS/HSL ABI is built
5//! around those widths; widening here would force us off the
6//! bit-equivalence path.
7
8/// Floating-point scalar — `Number` in Ipopt.
9pub type Number = f64;
10
11/// Signed index — `Index` in Ipopt. Held at 32 bits for ABI parity
12/// with MUMPS, MA27, etc.
13pub type Index = i32;
14
15/// Sentinel used by Ipopt for "no bound" in TNLP get_bounds_info.
16/// Value `1e19` is hard-coded throughout upstream; we match it.
17pub const NLP_LOWER_BOUND_INF: Number = -1e19;
18pub const NLP_UPPER_BOUND_INF: Number = 1e19;