Loading...
Searching...
No Matches
Digraph Class Reference
Concepts » Graph Structure Concepts

## 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 | 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.
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

## source()

Node source | ( | Arc |  | ) | const

inline

Returns the source node of the given arc.

## target()

Node target | ( | Arc |  | ) | const

inline

Returns the target node of the given arc.

## id() [1/2]

int id | ( | Node |  | ) | const

inline

Returns the ID of the given node.

## id() [2/2]

int id | ( | Arc |  | ) | const

inline

Returns the ID of the given arc.

## nodeFromId()

Node nodeFromId | ( | int |  | ) | const

inline

Returns the node with the given ID.

Precondition
  The argument should be a valid node ID in the digraph.

## arcFromId()

Arc arcFromId | ( | int |  | ) | const

inline

Returns the arc with the given ID.

Precondition
  The argument should be a valid arc ID in the digraph.

## maxNodeId()

int maxNodeId | ( |  | ) | const

inline

Returns an upper bound on the node IDs.

## maxArcId()

int maxArcId | ( |  | ) | const

inline

Returns an upper bound on the arc IDs.

## oppositeNode()

Node oppositeNode | ( | Node | ,
|  | Arc | ) const

inline

Returns the opposite node on the given arc.

## baseNode() [1/2]

Node baseNode | ( | OutArcIt |  | ) | const

inline

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

## runningNode() [1/2]

Node runningNode | ( | OutArcIt |  | ) | const

inline

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

## baseNode() [2/2]

Node baseNode | ( | InArcIt |  | ) | const

inline

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

## runningNode() [2/2]

Node runningNode | ( | InArcIt |  | ) | const

inline

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