abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
PotentialDifferenceMap< GR , POT > Class Template Reference

Potential difference map. More...

#include <lemon/maps.h>

Public Types

typedef GR::Arc Key
 Key type.
typedef POT::Value Value
 Value type.

Public Member Functions

 PotentialDifferenceMap (const GR &gr, const POT &potential)
 Constructor.
Value operator[] (const Key &arc) const
 Returns the potential difference for the given arc.

(Note that these are not member symbols.)

template< typename GR , typename POT >
PotentialDifferenceMap< GR , POT > potentialDifferenceMap (const GR &gr, const POT &potential)
 Returns a PotentialDifferenceMap.

Detailed Description

template< typename GR , typename POT >
class lemon::PotentialDifferenceMap< GR , POT >

PotentialDifferenceMap returns the difference between the potentials of the source and target nodes of each arc in a digraph, i.e. it returns

potential[ gr.target( arc ) ] - potential[ gr.source( arc ) ].
Template Parameters
GRThe digraph type.
POTA node map storing the potentials.

Constructor & Destructor Documentation

◆ PotentialDifferenceMap()

template< typename GR , typename POT >
PotentialDifferenceMap ( const GR & gr,
const POT & potential )
inlineexplicit

Contructor of the map.

Member Function Documentation

◆ operator[]()

template< typename GR , typename POT >
Value operator[] ( const Key & arc) const
inline

Returns the potential difference for the given arc, i.e.

potential[ gr.target( arc ) ] - potential[ gr.source( arc ) ].