Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Rcost_With_Tolerance< Net > Struct Template Reference

Cost of a residual arc, with a tolerance for the relaxations of Bellman-Ford (see the parameter Distance of Bellman_Ford), which the cycle canceling takes for a floating flow. More...

#include <tpl_netcost.H>

Inheritance diagram for Aleph::Rcost_With_Tolerance< Net >:
[legend]
Collaboration diagram for Aleph::Rcost_With_Tolerance< Net >:
[legend]

Public Member Functions

 Rcost_With_Tolerance () noexcept=default
 
 Rcost_With_Tolerance (const typename Net::Flow_Type &t) noexcept
 A cost of tolerance t.
 
Net::Flow_Type tolerance () const noexcept
 Return the tolerance.
 
- Public Member Functions inherited from Aleph::Rcost< Net >
 Rcost () noexcept=default
 
Net::Flow_Type operator() (typename Net::Arc *a) const noexcept
 Return the cost of an arc.
 

Public Attributes

Net::Flow_Type tol {0}
 A relaxation must improve a distance by more than it.
 

Additional Inherited Members

- Public Types inherited from Aleph::Rcost< Net >
using Distance_Type = typename Net::Flow_Type
 
- Static Public Member Functions inherited from Aleph::Rcost< Net >
static void set_zero (typename Net::Arc *a) noexcept
 Reset arc to zero state.
 

Detailed Description

template<class Net>
struct Aleph::Rcost_With_Tolerance< Net >

Cost of a residual arc, with a tolerance for the relaxations of Bellman-Ford (see the parameter Distance of Bellman_Ford), which the cycle canceling takes for a floating flow.

With costs that are not exact in binary, as tenths, the rounding of the sums made a cycle of cost zero negative, as an arc with a partial flow and its residual, at c and -c; cancelling it moved no flow, and the canceling did not end.

Template Parameters
NetResidual network type.

Definition at line 479 of file tpl_netcost.H.

Constructor & Destructor Documentation

◆ Rcost_With_Tolerance() [1/2]

template<class Net >
Aleph::Rcost_With_Tolerance< Net >::Rcost_With_Tolerance ( )
defaultnoexcept

◆ Rcost_With_Tolerance() [2/2]

template<class Net >
Aleph::Rcost_With_Tolerance< Net >::Rcost_With_Tolerance ( const typename Net::Flow_Type &  t)
inlineexplicitnoexcept

A cost of tolerance t.

Definition at line 487 of file tpl_netcost.H.

Member Function Documentation

◆ tolerance()

template<class Net >
Net::Flow_Type Aleph::Rcost_With_Tolerance< Net >::tolerance ( ) const
inlinenoexcept

Return the tolerance.

Definition at line 490 of file tpl_netcost.H.

References Aleph::Rcost_With_Tolerance< Net >::tol.

Member Data Documentation

◆ tol

template<class Net >
Net::Flow_Type Aleph::Rcost_With_Tolerance< Net >::tol {0}

A relaxation must improve a distance by more than it.

Definition at line 482 of file tpl_netcost.H.

Referenced by Aleph::Rcost_With_Tolerance< Net >::tolerance().


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