InDegMap

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

template< typename GR >
class InDegMap : protected ObserverBase

Map of the in-degrees of nodes in a digraph.

This map returns the in-degree of a node. Once it is constructed, the degrees are stored in a standard NodeMap, so each query is done in constant time. On the other hand, the values are updated automatically whenever the digraph changes.

See also

OutDegMap

Warning

Besides addNode() and addArc(), a digraph structure may provide alternative ways to modify the digraph. The correct behavior of InDegMap is not guarantied if these additional features are used. For example, the functions changeSource(), changeTarget() and reverseArc() of ListDigraph will not update the degree values correctly.

Public Types

typedef GR Graph

The graph type of InDegMap.

typedef GR Digraph
typedef Digraph::Node Key

The key type.

typedef int Value

The value type.

typedef ItemSetTraits< Digraph , typenameDigraph::Arc >::ItemNotifier::ObserverBase Parent

Public Functions

inline explicit InDegMap( const Digraph & graph )

Constructor.

Constructor for creating an in-degree map.

inline int operator[]( const Key & key ) const

Gives back the in-degree of a Node.

Protected Types

typedef Digraph::Arc Arc

Protected Functions

inline virtual void add( const Arc & arc )
inline virtual void add( const std::vector< Arc > & arcs )
inline virtual void erase( const Arc & arc )
inline virtual void erase( const std::vector< Arc > & arcs )
inline virtual void build()
inline virtual void clear()