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.
#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. | |
|
inline |
Returns the ID of the given node.
|
inline |
Returns the ID of the given arc.
|
inline |
Returns the node with the given ID.
|
inline |
Returns the arc with the given ID.
|
inline |
Returns an upper bound on the node IDs.
|
inline |
Returns an upper bound on the arc IDs.
Returns the base node of the given outgoing arc iterator (i.e. the source node of the corresponding arc).
Returns the running node of the given outgoing arc iterator (i.e. the target node of the corresponding arc).
Returns the base node of the given incoming arc iterator (i.e. the target node of the corresponding arc).