The current implementation calculates either an embedding or a Kuratowski subdivision. The running time of the algorithm is O(n).
#include <lemon/planarity.h>
Public Types | |
typedef Graph::template ArcMap < Arc > | EmbeddingMap |
The map type for storing the embedding. | |
Public Member Functions | |
PlanarEmbedding (const Graph &graph) | |
Constructor. | |
bool | run (bool kuratowski=true) |
Run the algorithm. | |
Arc | next (const Arc &arc) const |
Give back the successor of an arc. | |
const EmbeddingMap & | embeddingMap () const |
Give back the calculated embedding map. | |
bool | kuratowski (const Edge &edge) const |
Give back true if the given edge is in the Kuratowski subdivision. |
typedef Graph::template ArcMap<Arc> EmbeddingMap |
The map type for storing the embedding.
PlanarEmbedding | ( | const Graph & | graph | ) | [inline] |
Constructor.
bool run | ( | bool | kuratowski = true |
) | [inline] |
This function runs the algorithm.
kuratowski | If this parameter is set to false , then the algorithm does not compute a Kuratowski subdivision. |
true
if the graph is planar. Arc next | ( | const Arc & | arc | ) | const [inline] |
This function gives back the successor of an arc. It makes possible to query the cyclic order of the outgoing arcs from a node.
const EmbeddingMap& embeddingMap | ( | ) | const [inline] |
This function gives back the calculated embedding map, which contains the successor of each arc in the cyclic order of the outgoing arcs of its source node.
bool kuratowski | ( | const Edge & | edge | ) | const [inline] |
This function gives back true
if the given edge is in the found Kuratowski subdivision.
run()
function must be called with true
parameter before using this function.