28 return std::max(
a,
b);
38 return std::max(std::max(
a,
b), c);
49 return std::max(std::max(
a,
b), std::max(c, d));
58 return std::min(
a,
b);
68 return std::min(std::min(
a,
b), c);
79 return std::min(std::min(
a,
b), std::min(c, d));
114 unsigned int abortlimit = std::numeric_limits<unsigned int>::max()
167 if(
len < std::numeric_limits<T>::max() )
169 len = std::numeric_limits<T>::max();
174 std::stringstream
what;
175 what <<
"Cannot allocate more than " << std::numeric_limits<T>::max()*
sizeof(
T) <<
" bytes for " <<
context <<
" due to limitation on integer type";
176 throw std::overflow_error(
what.str());
Templated class which stores one entry for the CachedResult class.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
IPOPTLIB_EXPORT Number CpuTime()
method determining CPU time
IPOPTLIB_EXPORT Number SysTime()
method determining system time
IPOPTLIB_EXPORT bool RegisterInterruptHandler(void(*handle_interrupt)(void), bool *interrupt_flag, unsigned int abortlimit=std::numeric_limits< unsigned int >::max())
register handler for interrupt signals
IPOPTLIB_EXPORT bool IsFiniteNumber(Number val)
Function returning true iff the argument is a valid double number (not NaN or Inf).
IPOPTLIB_EXPORT bool Compare_le(Number lhs, Number rhs, Number BasVal)
Method for comparing two numbers within machine precision.
IPOPTLIB_EXPORT void IpResetRandom01()
Function resetting the random number generator.
ipnumber Number
Type of all numbers.
IPOPTLIB_EXPORT bool UnregisterInterruptHandler(void)
unregister previously registered handler for interrupt signals
IPOPTLIB_EXPORT int Snprintf(char *str, long size, const char *format,...)
Method for printing a formatted output to a string with given size.
IPOPTLIB_EXPORT Number WallclockTime()
method determining wallclock time since first call
IPOPTLIB_EXPORT Number IpRandom01()
Function returning a random number between 0 and 1.
void ComputeMemIncrease(T &len, double recommended, T min, const char *context)
Method to calculate new length for a memory increase based on a recommendation and limits in integer ...