Tulip  5.3.1
Large graphs analysis and drawing
tlp::PlanarityTest Class Reference

#include <PlanarityTest.h>

Static Public Member Functions

static std::list< edgegetObstructionsEdges (Graph *graph)
 
static bool isPlanar (Graph *graph)
 
static bool isPlanarEmbedding (const Graph *graph)
 
static bool planarEmbedding (Graph *graph)
 

Detailed Description

performs tests to check whether a graph is planar. From wikipedia: "A planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints."

Definition at line 37 of file PlanarityTest.h.

Member Function Documentation

◆ getObstructionsEdges()

static std::list<edge> tlp::PlanarityTest::getObstructionsEdges ( Graph graph)
static

Computes a list of edges that prevent the graph from being planar (i.e. part of the minor of K3,3 or K5).

Parameters
graphThe graph on which to compute the obstruction edges.
Returns
:list< tlp::edge, std::allocator< tlp::edge > > The obstruction edges.

◆ isPlanar()

static bool tlp::PlanarityTest::isPlanar ( Graph graph)
static

Checks whether the graph is planar (i.e. the graph can be drawn on the plane in such a way that no edges cross each other).

Parameters
graphThe graph to check for planarity.
Returns
bool True if the graph is planar, false otherwise.
Note
The graph is made biconnected to ease (?) the computation.

◆ isPlanarEmbedding()

static bool tlp::PlanarityTest::isPlanarEmbedding ( const Graph graph)
static

Checks if the graph is plane (or a planar embedding). A planar graph can be drawn such as no edges cross each other, a plane graph is drawn such as no edges cross each other.

Returns true if the current embedding of the graph is planar, false otherwise.

Parameters
graphThe graph to check for a planar e;bedding.
Returns
bool True if the graph is a planar embedding, false otherwise.

◆ planarEmbedding()

static bool tlp::PlanarityTest::planarEmbedding ( Graph graph)
static

Makes a planar graph a planar embedding, i.e. makes a graph so that no edges cross each other if it is known to be possible. This modifies the order of the edges around the nodes.

Parameters
graphThe graph to make a planar embedding of.
Returns
bool True if the graph is planar, false otherwise.