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

Cost distance functor for Bellman-Ford on residual networks. More...

#include <tpl_netcost.H>

Public Types

using Distance_Type = typename Net::Flow_Type
 

Public Member Functions

 Rcost () noexcept=default
 
Net::Flow_Type operator() (typename Net::Arc *a) const noexcept
 Return the cost of an arc.
 

Static Public Member Functions

static void set_zero (typename Net::Arc *a) noexcept
 Reset arc to zero state.
 

Detailed Description

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

Cost distance functor for Bellman-Ford on residual networks.

Provides the cost of an arc as its "distance" for shortest path algorithms.

Template Parameters
NetNetwork type.

Definition at line 378 of file tpl_netcost.H.

Member Typedef Documentation

◆ Distance_Type

template<class Net >
using Aleph::Rcost< Net >::Distance_Type = typename Net::Flow_Type

Definition at line 382 of file tpl_netcost.H.

Constructor & Destructor Documentation

◆ Rcost()

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

Member Function Documentation

◆ operator()()

template<class Net >
Net::Flow_Type Aleph::Rcost< Net >::operator() ( typename Net::Arc a) const
inlinenoexcept

Return the cost of an arc.

Parameters
[in]aArc to get cost from.
Returns
The arc's cost value.

Definition at line 389 of file tpl_netcost.H.

◆ set_zero()

template<class Net >
static void Aleph::Rcost< Net >::set_zero ( typename Net::Arc a)
inlinestaticnoexcept

Reset arc to zero state.

Sets capacity to max, flow and cost to zero.

Parameters
[in]aArc to reset.

Definition at line 400 of file tpl_netcost.H.


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