BellmanFordDefaultOperationTraits

Declared in lemon/bellman_ford.h, in the group Shortest Path Algorithms; the same struct on the Doxygen site.

template< typename V , bool has_inf = std::numeric_limits< V >::has_infinity >
struct BellmanFordDefaultOperationTraits

Default OperationTraits for the BellmanFord algorithm class.

This operation traits class defines all computational operations and constants that are used in the Bellman-Ford algorithm. The default implementation is based on the numeric_limits class. If the numeric type does not have infinity value, then the maximum value is used as extremal infinity value.

Subclassed by ToleranceBfOperationTraits< Cost >

Public Types

typedef V Value

Public Static Functions

static inline Value zero()

Gives back the zero value of the type.

static inline Value infinity()

Gives back the positive infinity value of the type.

static inline Value plus( const Value & left , const Value & right )

Gives back the sum of the given two elements.

static inline bool less( const Value & left , const Value & right )

Gives back true only if the first value is less than the second.

template< typename V >
struct BellmanFordDefaultOperationTraits< V , false >

Public Types

typedef V Value

Public Static Functions

static inline Value zero()
static inline Value infinity()
static inline Value plus( const Value & left , const Value & right )
static inline bool less( const Value & left , const Value & right )