Class LeftRightPlanarityCheck

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class LeftRightPlanarityCheck : public NetworKit::Algorithm

Public Functions

LeftRightPlanarityCheck(const Graph &G)

Implements the left-right planarity test as described in citation. This algorithm determines whether a graph is planar, i.e., whether it can be drawn on a plane without any edges crossing. For an overview of planar graphs, refer to: https://en.wikipedia.org/wiki/Planar_graph

The algorithm achieves (almost) linear runtime complexity. The only non-linear component arises from sorting the nodes of the depth-first search tree.

Parameters:

G – The input graph to test for planarity. The graph should be undirected.

Throws:

std::runtime_error – if graph is not an undirected graph

virtual void run() override

The generic run method which calls runImpl() and takes care of setting hasRun to the appropriate value.

inline bool isPlanar() const