PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
BBValueTraits< V > Struct Template Reference

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

#include <PBeFS/bnb/BranchAndBound.h>

Static Public Member Functions

static constexpr V infinity (void) noexcept
 the infinite value
static constexpr V none (void) noexcept
 the value of a Solution with no feasible value
static constexpr bool finite (V v) noexcept
 true if v is finite
static 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 bool within (V b, V l, V z, double g) noexcept
 true if b is at most l + g ( z - l ), z being finite

Detailed Description

template<class V>
struct PBeFS_di_unipi_it::BBValueTraits< V >

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.

Member Function Documentation

◆ finite()

template<class V>
constexpr bool finite ( V v)
inlinestaticnodiscardconstexprnoexcept

true if v is finite

◆ infinity()

template<class V>
constexpr V infinity ( void )
inlinestaticnodiscardconstexprnoexcept

the infinite value

◆ none()

template<class V>
constexpr V none ( void )
inlinestaticnodiscardconstexprnoexcept

the value of a Solution with no feasible value

◆ tolerance()

template<class V>
V tolerance ( V z,
V a,
double r )
inlinestaticnodiscardnoexcept

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

◆ within()

template<class V>
bool within ( V b,
V l,
V z,
double g )
inlinestaticnodiscardnoexcept

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


The documentation for this struct was generated from the following file: