An edge in a graph More...
#include <GTL/edge.h>
[public]
Default constructor. Creates an invalid edge. The only way to obtain a valid edge is through graph::new_edge Example:
graph g; node n1, n2; edge e;n1 = g.new_node(); n2 = g.new_node(); e = g.new_edge(n1, n2);
[public]
Returns the source node of the edge.
[public]
Returns the target node of the edge.
[public]
Changes the direction of this edge.
[public]
Makes n
the source of this edge. Takes O(1) time.
n | new source |
[public]
Makes n
the target of this edge. Takes O(1) time.
n | new target |
[public]
Returns true iff node is hidden.
Kdoc |