Expand description
Numerical and timing utilities.
Mirrors Common/IpUtils.{hpp,cpp}. The PRNG is a portable
reimplementation of POSIX drand48 (48-bit LCG with the
glibc-default seed) so output matches a drand48-built upstream
Ipopt deterministically. Replace with libc’s drand48 later if a
particular platform’s bit-equivalence target requires it.
Functions§
- compare_
le - Equivalent to
Ipopt::Compare_le(lhs, rhs, BasVal)— relaxed<=with a tolerance proportional to|BasVal|. Threshold matches upstream’s(10 * machine_epsilon * Max(1, |BasVal|)). - compute_
mem_ increase_ i64 - Equivalent to
Ipopt::ComputeMemIncrease. Updateslento a new length consistent withrecommended/minwhile clamping toT::MAX. ReturnsErrif even the maximum representable size would not be an increase. - cpu_
time - CPU time in seconds. Equivalent to
Ipopt::CpuTime. - ip_
random_ 01 - Equivalent to
Ipopt::IpRandom01. 48-bit LCG matching POSIXdrand48: X_{n+1} = (0x5DEECE66D · X_n + 0xB) mod 2^48, returning the high-order 48 bits as af64in [0, 1). - ip_
reset_ random_ 01 - Reset the PRNG to glibc’s default seed. Equivalent to
Ipopt::IpResetRandom01. - is_
finite_ number - Equivalent to
Ipopt::IsFiniteNumber. Returns false for NaN/±∞. - sys_
time - System time in seconds since UNIX epoch. Equivalent to
Ipopt::SysTime. - wallclock_
time - Wallclock time in seconds since first call. Equivalent to
Ipopt::WallclockTime.