BBValueTraits

Declared in bnb/BranchAndBound.h; the same struct on the site of Doxygen.

template<class V>
struct BBValueTraits

what the B&B needs to know of the type V of its values

The primary template serves the signed arithmetic types: infinity() is the infinity of a floating point type and the largest value of an integer one (whose opposite is then the least infinite value), none() the value of a Solution with no feasible value (a quiet NaN, or infinity() if V has none), and tolerance( z , a , r ) is \( \max \{ a , r |z| \} \), rounded down for an integer type. within( b , l , z , g ) tells whether a bound \( b \) is at most \( l + \gamma ( z - l ) \), false if \( l \) is not finite, computed in V for a floating point type and in long double for an integer one, which cannot overflow. A caller with another type of values (e.g., the rationals of an exact arithmetic) specializes the class with the same members.

Public Static Functions

static inline constexpr V infinity(void) noexcept

the infinite value

static inline constexpr V none(void) noexcept

the value of a Solution with no feasible value

static inline constexpr bool finite(V v) noexcept

true if v is finite

static inline V tolerance(V z, V a, double r) noexcept

the tolerance on the gap of the finite incumbent z, by the absolute tolerance a and the relative one r

static inline bool within(V b, V l, V z, double g) noexcept

true if b is at most l + g ( z - l ), z being finite