planar_embedding Class Reference

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

Collaboration diagram for planar_embedding:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 planar_embedding (const planar_embedding &em)
virtual ~planar_embedding ()
planar_embeddingoperator= (const planar_embedding &em)
adj_listadjacency (node n)
const adj_listadjacency (node n) const
iterator adj_edges_begin (node n)
iterator adj_edges_end (node n)
edge cyclic_next (node n, edge e)
edge cyclic_prev (node n, edge e)
void write_st (ostream &os, st_number &st)
list< edge > & selfloops ()
const list< edge > & selfloops () const
list< edge > & multiple_edges ()
const list< edge > & multiple_edges () const
bool check ()

Friends

class planarity
class pq_tree


Detailed Description

Ordered adjacency lists as a result of planarity testing.

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.


Constructor & Destructor Documentation

planar_embedding::planar_embedding ( const planar_embedding em  ) 

Make this object a copy of em.

Parameters:
em planar embedding

virtual planar_embedding::~planar_embedding (  )  [inline, virtual]

Destructor.


Member Function Documentation

planar_embedding& planar_embedding::operator= ( const planar_embedding em  ) 

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

Parameters:
em 
Returns:
reference to this object

adj_list& planar_embedding::adjacency ( node  n  )  [inline]

Returns reference to ordered adjacency list of node n.

Parameters:
n node
Returns:
ordered adjacency list

const adj_list& planar_embedding::adjacency ( node  n  )  const [inline]

Returns reference to ordered adjacency list of node n.

Parameters:
n node
Returns:
ordered adjacency list

iterator planar_embedding::adj_edges_begin ( node  n  )  [inline]

Start iteration through adjacency list of node n.

Parameters:
n node
Returns:
start iterator

iterator planar_embedding::adj_edges_end ( node  n  )  [inline]

End of iteration through adjacency list of node n.

Parameters:
@p n node
Returns:
one-past the end iterator

edge planar_embedding::cyclic_next ( node  n,
edge  e 
)

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

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

edge planar_embedding::cyclic_prev ( node  n,
edge  e 
)

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

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

void planar_embedding::write_st ( ostream &  os,
st_number st 
)

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

Parameters:
os output stream
st st-numbers

list<edge>& planar_embedding::selfloops (  )  [inline]

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

Return values:
list of selfloops

const list<edge>& planar_embedding::selfloops (  )  const [inline]

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

Return values:
list of selfloops

list<edge>& planar_embedding::multiple_edges (  )  [inline]

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.

Return values:
list of multiple edges

const list<edge>& planar_embedding::multiple_edges (  )  const [inline]

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.

Return values:
list of multiple edges

bool planar_embedding::check (  ) 

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.

Return values:
true iff embedding is correct