planar_embedding Class Reference

[Index] [Hierarchy] [Headers]


ordered adjacency lists as a result of planarity testing. More...

#include <GTL/embedding.h>

Public Members


Detailed Description

It is known that if a graph is planar the adjacency list of every node can be ordered in such a way that it reflects the order the adjacent edges will have in a planar drawing around the node. Although the tested graph might have been directed the planar embedding one gets will always correspond to the underlying undirected graph, i.e. an edge from n1 to n2 will occurr in both adjacency lists.


planar_embedding(const planar_embedding& em) [public]

Make this object a copy of em

Parameters:
em planar embedding

~planar_embedding() [public virtual]

Destructor

planar_embedding& operator=(const planar_embedding& em) [public]

Assigns em to this object. All former information in this object will be deleted.

Parameters:
em
Returns:
reference to this object.

adj_list& adjacency(node n) [public]

Returns reference to ordered adjacency list of node n

Parameters:
n node
Returns:
ordered adjacency list.

const adj_list& adjacency(node n) const [public]

Returns reference to ordered adjacency list of node n

Parameters:
n node
Returns:
ordered adjacency list.

iterator adj_edges_begin(node n) [public]

Start iteration through adjacency list of node n.

Parameters:
n node.
Returns:
start iterator.

iterator adj_edges_end(node n) [public]

End of iteration through adjacency list of node n.

Parameters:
n node.
Returns:
one-past the end iterator.

edge cyclic_next(node n, edge e) [public]

Returns the cyclic successor of edge e in the adjacency list of node n.

Parameters:
e edge adjacent to n
n node
Returns:
edge following e in adjacency of n

edge cyclic_prev(node n, edge e) [public]

Returns the cyclic predecessor of edge e in the adjacency list of node n.

Parameters:
e edge adjacent to n
n node
Returns:
edge preceding e in adjacency of n

void write_st(ostream& os, st_number& st) [public]

Writes embedding with st-numbers as given by st to os.

Parameters:
st st-numbers
os output stream

list<edge>& selfloops() [public]

Returns list of selfloops contained in the graph. These will not occur in the adjacency lists.

Returns:
list of selfloops.

const list<edge>& selfloops() const [public]

Returns list of selfloops contained in the graph. These will not occur in the adjacency lists.

Returns:
list of selfloops.

list<edge>& multiple_edges() [public]

Returns list of multiple edges contained in the graph. These are edges for which there is already another edge connecting the same endpoints is contained in the adjacency lists. Please note that the notion "connecting" is meant in an undirected sense. These edges will not occur it the adjacency lists.

Returns:
list of multiple edges.

const list<edge>& multiple_edges() const [public]

Returns list of multiple edges contained in the graph. These are edges for which there is already another edge connecting the same endpoints is contained in the adjacency lists. Please note that the notion "connecting" is meant in an undirected sense. These edges will not occur it the adjacency lists.

Returns:
list of multiple edges.

bool check() [public]

Used for debugging only. Checks whether this is a correct planar embedding by checking the faces of the graph, i.e. at any node starting with an arbitrary adjacent edge and advancing along cyclic_next the start node must be met through the edge given by cyclic_prev of the edge we started with.

Returns:
true iff embedding is correct.

Kdoc