Undirector
Declared in lemon/adaptors.h, in the group Adaptor Classes for Graphs; the same class on the Doxygen site.
-
template< typename DGR >
class Undirector Adaptor class for viewing a digraph as an undirected graph.
Undirector adaptor can be used for viewing a digraph as an undirected graph. All arcs of the underlying digraph are showed in the adaptor as an edge (and also as a pair of arcs, of course). This adaptor conforms to the Graph concept.
The adapted digraph can also be modified through this adaptor by adding or removing nodes or edges, unless the
DGRtemplate parameter is set to beconst.This class provides item counting in the same time as the adapted digraph structure.
Note
The
Nodetype of this adaptor and the adapted digraph are convertible to each other, moreover theEdgetype of the adaptor and theArctype of the adapted digraph are also convertible to each other. (Thus theArctype of the adaptor is convertible to theArctype of the adapted digraph.)- Template Parameters:
DGR – The type of the adapted digraph. It must conform to the Digraph concept. It can also be specified to be
const.
Public Functions
Public Static Functions
-
template< typename FW , typename BK >
static inline CombinedArcMap< FW , BK > combinedArcMap(
) Returns a combined arc map.
This function just returns a combined arc map.
-
template< typename FW , typename BK >
static inline CombinedArcMap< const FW , BK > combinedArcMap(
)
-
template< typename FW , typename BK >
static inline CombinedArcMap< FW , const BK > combinedArcMap(
)
Protected Functions
-
inline Undirector()
-
template< typename FW , typename BK >
class CombinedArcMap Arc map combined from two original arc maps.
This map adaptor class adapts two arc maps of the underlying digraph to get an arc map of the undirected graph. Its value type is inherited from the first arc map type (
FW).- Template Parameters:
FW – The type of the “foward” arc map.
BK – The type of the “backward” arc map.
Public Types
-
typedef Parent::Arc Key
The key type of the map.
Public Functions
-
inline ConstReturnValue operator[]( const Key & e ) const
Returns the value associated with the given key.
-
inline ReturnValue operator[]( const Key & e )
Returns a reference to the value associated with the given key.