![]() |
abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
|
Class describing the concept of directed graphs. More...
#include <lemon/concepts/digraph.h>
Classes | |
| class | Node |
| The node type of the digraph. More... | |
| class | NodeIt |
| Iterator class for the nodes. More... | |
| class | Arc |
| The arc type of the digraph. More... | |
| class | OutArcIt |
| Iterator class for the outgoing arcs of a node. More... | |
| class | InArcIt |
| Iterator class for the incoming arcs of a node. More... | |
| class | ArcIt |
| Iterator class for the arcs. More... | |
| class | NodeMap |
| Standard graph map type for the nodes. More... | |
| class | ArcMap |
| Standard graph map type for the arcs. More... | |
Public Member Functions | |
| Digraph () | |
| Default constructor. | |
| LemonRangeWrapper1< NodeIt , Digraph > | nodes () const |
| Gets the collection of the nodes of the digraph. | |
| LemonRangeWrapper2< OutArcIt , Digraph , Node > | outArcs (const Node &u) const |
| Gets the collection of the outgoing arcs of a certain node of the digraph. | |
| LemonRangeWrapper2< InArcIt , Digraph , Node > | inArcs (const Node &u) const |
| Gets the collection of the incoming arcs of a certain node of the digraph. | |
| LemonRangeWrapper1< ArcIt , Digraph > | arcs () const |
| Gets the collection of the arcs of the digraph. | |
| 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. | |
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.
|
inline |
This function can be used for iterating on the nodes of the digraph. It returns a wrapped NodeIt, which looks like an STL container (by having begin() and end()) which you can use in range-based for loops, STL algorithms, etc. For example you can write:
|
inline |
This function can be used for iterating on the outgoing arcs of a certain node of the digraph. It returns a wrapped OutArcIt, which looks like an STL container (by having begin() and end()) which you can use in range-based for loops, STL algorithms, etc. For example if g is a Digraph and u is a node, you can write:
|
inline |
This function can be used for iterating on the incoming arcs of a certain node of the digraph. It returns a wrapped InArcIt, which looks like an STL container (by having begin() and end()) which you can use in range-based for loops, STL algorithms, etc. For example if g is a Digraph and u is a node, you can write:
|
inline |
This function can be used for iterating on the arcs of the digraph. It returns a wrapped ArcIt, which looks like an STL container (by having begin() and end()) which you can use in range-based for loops, STL algorithms, etc. For example you can write:
|
inline |
Returns the source node of the given arc.
|
inline |
Returns the target node of the given arc.
|
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.
|
inline |
Returns the opposite node on the given arc.
|
inline |
Returns the base node of the given outgoing arc iterator (i.e. the source node of the corresponding arc).
|
inline |
Returns the running node of the given outgoing arc iterator (i.e. the target node of the corresponding arc).
|
inline |
Returns the base node of the given incoming arc iterator (i.e. the target node of the corresponding arc).
|
inline |
Returns the running node of the given incoming arc iterator (i.e. the source node of the corresponding arc).