All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Member Functions
Digraph Class Reference

Detailed Description

This class describes the common interface of all directed graphs (digraphs).

Like all concept classes, it only provides an interface without any sensible implementation. So any general algorithm for directed graphs should compile with this class, but it will not run properly, of course. An actual digraph implementation like ListDigraph or SmartDigraph may have additional functionality.

See Also
Graph

#include <lemon/concepts/digraph.h>

Classes

class  Arc
 The arc type of the digraph. More...
 
class  ArcIt
 Iterator class for the arcs. More...
 
class  ArcMap
 Standard graph map type for the arcs. More...
 
class  InArcIt
 Iterator class for the incoming arcs of a node. More...
 
class  Node
 The node type of the digraph. More...
 
class  NodeIt
 Iterator class for the nodes. More...
 
class  NodeMap
 Standard graph map type for the nodes. More...
 
class  OutArcIt
 Iterator class for the outgoing arcs of a node. More...
 

Public Member Functions

 Digraph ()
 Default constructor.
 
Node source (Arc) const
 The source node of the arc.
 
Node target (Arc) const
 The target node of the arc.
 
int id (Node) const
 The ID of the node.
 
int id (Arc) const
 The ID of the arc.
 
Node nodeFromId (int) const
 The node with the given ID.
 
Arc arcFromId (int) const
 The arc with the given ID.
 
int maxNodeId () const
 An upper bound on the node IDs.
 
int maxArcId () const
 An upper bound on the arc IDs.
 
Node oppositeNode (Node, Arc) const
 The opposite node on the arc.
 
Node baseNode (OutArcIt) const
 The base node of the iterator.
 
Node runningNode (OutArcIt) const
 The running node of the iterator.
 
Node baseNode (InArcIt) const
 The base node of the iterator.
 
Node runningNode (InArcIt) const
 The running node of the iterator.
 

Private Member Functions

 Digraph (const Digraph &)
 Diraphs are not copy constructible. Use DigraphCopy instead.
 
void operator= (const Digraph &)
 Assignment of a digraph to another one is not allowed. Use DigraphCopy instead.
 

Member Function Documentation

Node source ( Arc  ) const
inline

Returns the source node of the given arc.

Node target ( Arc  ) const
inline

Returns the target node of the given arc.

int id ( Node  ) const
inline

Returns the ID of the given node.

int id ( Arc  ) const
inline

Returns the ID of the given arc.

Node nodeFromId ( int  ) const
inline

Returns the node with the given ID.

Precondition
The argument should be a valid node ID in the digraph.
Arc arcFromId ( int  ) const
inline

Returns the arc with the given ID.

Precondition
The argument should be a valid arc ID in the digraph.
int maxNodeId ( ) const
inline

Returns an upper bound on the node IDs.

int maxArcId ( ) const
inline

Returns an upper bound on the arc IDs.

Node oppositeNode ( Node  ,
Arc   
) const
inline

Returns the opposite node on the given arc.

Node baseNode ( OutArcIt  ) const
inline

Returns the base node of the given outgoing arc iterator (i.e. the source node of the corresponding arc).

Node runningNode ( OutArcIt  ) const
inline

Returns the running node of the given outgoing arc iterator (i.e. the target node of the corresponding arc).

Node baseNode ( InArcIt  ) const
inline

Returns the base node of the given incoming arc iterator (i.e. the target node of the corresponding arc).

Node runningNode ( InArcIt  ) const
inline

Returns the running node of the given incoming arc iterator (i.e. the source node of the corresponding arc).