PotentialDifferenceMap

Declared in lemon/maps.h, in the group Graph Maps; the same class on the Doxygen site.

template< typename GR , typename POT >
class PotentialDifferenceMap

Potential difference map.

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:
  • GR – The digraph type.

  • POT – A node map storing the potentials.

Public Types

typedef GR::Arc Key

Key type.

typedef POT::Value Value

Value type.

Public Functions

inline explicit PotentialDifferenceMap( const GR & gr , const POT & potential )

Constructor.

Contructor of the map.

inline Value operator[]( const Key & arc ) const

Returns the potential difference for the given arc.

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

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