Skip to contents

The planar drawing algorithm calculates positions for the nodes in the plane. These coordinates satisfy that if the edges are represented with straight lines, then they will not intersect each other.

Usage

PlanarDrawing(arcSources, arcTargets, numNodes)

Arguments

arcSources

Vector corresponding to the source nodes of a graph's edges

arcTargets

Vector corresponding to the destination nodes of a graph's edges

numNodes

The number of nodes in the graph

Value

A named list of 1) "is_planar": a logical of if the graph is planar, 2) "x_coords": the x-coordinate of the planar embedding, 3) "y_coords": the y-coordinate of the planar embedding

Details

See https://lemon.cs.elte.hu/pub/doc/1.3.1/a00307.html for more information.