pounce-common 0.3.0

Common primitives for POUNCE (port of Ipopt's src/Common): types, exceptions, journalist, options, tagged objects, cached results.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Fundamental scalar types.
//!
//! Mirrors `Common/IpTypes.h` and `Common/IpTypes.hpp`. We commit to
//! `f64` and `i32` for v1.0 because Ipopt's MUMPS/HSL ABI is built
//! around those widths; widening here would force us off the
//! bit-equivalence path.

/// Floating-point scalar — `Number` in Ipopt.
pub type Number = f64;

/// Signed index — `Index` in Ipopt. Held at 32 bits for ABI parity
/// with MUMPS, MA27, etc.
pub type Index = i32;

/// Sentinel used by Ipopt for "no bound" in TNLP get_bounds_info.
/// Value `1e19` is hard-coded throughout upstream; we match it.
pub const NLP_LOWER_BOUND_INF: Number = -1e19;
pub const NLP_UPPER_BOUND_INF: Number = 1e19;