concepts::BaseGraphComponent

Declared in lemon/concepts/graph_components.h, in the group Graph Structure Concepts; the same class on the Doxygen site.

class BaseGraphComponent : public BaseDigraphComponent

Base skeleton class for undirected graphs.

This class describes the base interface of undirected graph types. All graph concepts have to conform to this class. It extends the interface of BaseDigraphComponent with an Edge type and functions to get the end nodes of edges, to convert from arcs to edges and to get both direction of edges.

Subclassed by AlterableDigraphComponent< BaseGraphComponent >, ClearableDigraphComponent< BaseGraphComponent >, IDableDigraphComponent< BaseGraphComponent >, IterableDigraphComponent< BaseGraphComponent >, MappableDigraphComponent< BaseGraphComponent >, BaseBpGraphComponent, ErasableGraphComponent< BAS >, ExtendableGraphComponent< BAS >

Public Types

typedef BaseGraphComponent Graph
typedef BaseDigraphComponent::Node Node
typedef BaseDigraphComponent::Arc Arc

Public Functions

inline Node u( const Edge & ) const

Return one end node of an edge.

This function returns one end node of an edge.

inline Node v( const Edge & ) const

Return the other end node of an edge.

This function returns the other end node of an edge.

inline Arc direct( const Edge & , bool ) const

Return a directed arc related to an edge.

This function returns a directed arc from its direction and the represented edge.

inline Arc direct( const Edge & , const Node & ) const

Return a directed arc related to an edge.

This function returns a directed arc from its source node and the represented edge.

inline bool direction( const Arc & ) const

Return the direction of the arc.

Returns the direction of the arc. Each arc represents an edge with a direction. It gives back the direction.

inline Arc oppositeArc( const Arc & ) const

Return the opposite arc.

This function returns the opposite arc, i.e. the arc representing the same edge and has opposite direction.

class Edge : public GraphItem< 'e' >

Undirected edge class of the graph.

This class represents the undirected edges of the graph. Undirected graphs can be used as directed graphs, each edge is represented by two opposite directed arcs.

Public Functions

inline Edge()

Default constructor.

Warning

The default constructor is not required to set the item to some well-defined value. So you should consider it as uninitialized.

inline Edge( const Edge & )

Copy constructor.

inline const Edge & operator=( const Edge & )

Assignment operator.

inline Edge(Invalid)

Constructor for conversion from INVALID. It initializes the item to be invalid.

See also

Invalid for more details.

inline Edge( const Arc & )

Constructor for conversion from an arc. Besides the core graph item functionality each arc should be convertible to the represented edge.

template< typename _Graph >
struct Constraints

Public Types

typedef _Graph::Node Node
typedef _Graph::Arc Arc
typedef _Graph::Edge Edge

Public Functions

inline void constraints()
inline Constraints()

Public Members

const _Graph & graph