OpenGraph DrawingFramework

v. 2022.02 (Dogwood)

ogdf::PlanarizationLayout Class Reference

The planarization approach for drawing graphs. More...

#include <ogdf/planarity/PlanarizationLayout.h>

Inheritance diagram for ogdf::PlanarizationLayout:

Public Member Functions

PlanarizationLayout ()
Creates an instance of planarization layout and sets options to default values. More...

~PlanarizationLayout ()
Destructor. More...

void call (GraphAttributes &ga) override
Calls planarization layout for GraphAttributes ga. More...

void call (GraphAttributes &ga, Graph &g)
Calls planarization layout with clique handling for GraphAttributes ga with associated graph g. More...

void callSimDraw (GraphAttributes &ga)

Optional parameters
double pageRatio () const
Returns the current setting of option pageRatio. More...

void pageRatio (double ratio)
Sets the option pageRatio to ratio. More...

int minCliqueSize () const
Returns the current setting of option minCliqueSize. More...

void minCliqueSize (int i)
Set the option minCliqueSize to i. More...

Module options
void setCrossMin (CrossingMinimizationModule *pCrossMin)
Sets the module option for crossing minimization. More...

void setEmbedder (EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm. More...

void setPlanarLayouter (LayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm. More...

void setPacker (CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components. More...

Further information
int numberOfCrossings () const
Returns the number of crossings in the computed layout. More...

Public Member Functions inherited from ogdf::LayoutModule
LayoutModule ()
Initializes a layout module. More...

virtual ~LayoutModule ()

void operator() (GraphAttributes &GA)
Computes a layout of graph GA. More...

Private Types

using CliqueReplacer = planarization_layout::CliqueReplacer

Private Member Functions

void arrangeCCs (PlanRep &PG, GraphAttributes &GA, Array< DPoint > &boundingBox) const

void fillAdjNodes (List< node > &adjNodes, PlanRep &PG, node centerNode, NodeArray< bool > &isClique, Layout &drawing)

void preprocessCliques (Graph &G, CliqueReplacer &cliqueReplacer)

Private Attributes

int m_cliqueSize
The minimum size of cliques to search for. More...

std::unique_ptr< CrossingMinimizationModulem_crossMin
The module for computing a planar subgraph. More...

std::unique_ptr< EmbedderModulem_embedder
The module for planar embedding. More...

int m_nCrossings
The number of crossings in the computed layout. More...

std::unique_ptr< CCLayoutPackModulem_packer
The module for arranging connected components. More...

double m_pageRatio
The desired page ratio. More...

std::unique_ptr< LayoutPlanRepModulem_planarLayouter
The module for computing a planar layout. More...

Detailed Description

The planarization approach for drawing graphs.

Definition at line 48 of file PlanarizationLayout.h.

◆ CliqueReplacer

 private

Definition at line 165 of file PlanarizationLayout.h.

◆ PlanarizationLayout()

 ogdf::PlanarizationLayout::PlanarizationLayout ( )

Creates an instance of planarization layout and sets options to default values.

◆ ~PlanarizationLayout()

 ogdf::PlanarizationLayout::~PlanarizationLayout ( )
inline

Destructor.

Definition at line 55 of file PlanarizationLayout.h.

◆ arrangeCCs()

 void ogdf::PlanarizationLayout::arrangeCCs ( PlanRep & PG, GraphAttributes & GA, Array< DPoint > & boundingBox ) const
private

◆ call() [1/2]

 void ogdf::PlanarizationLayout::call ( GraphAttributes & ga )
overridevirtual

Calls planarization layout for GraphAttributes ga.

Precondition
The graph has no self-loops.
Parameters
 ga is the input graph and will also be assigned the layout information.

Implements ogdf::LayoutModule.

◆ call() [2/2]

 void ogdf::PlanarizationLayout::call ( GraphAttributes & ga, Graph & g )

Calls planarization layout with clique handling for GraphAttributes ga with associated graph g.

Precondition
g is the graph associated with graph attributes ga.

This call perfoms a special handling for cliques, which are temporarily replaced by a star graph. In the final drawing, the clique edges are drawn straight-line.

◆ callSimDraw()

 void ogdf::PlanarizationLayout::callSimDraw ( GraphAttributes & ga )

 void ogdf::PlanarizationLayout::fillAdjNodes ( List< node > & adjNodes, PlanRep & PG, node centerNode, NodeArray< bool > & isClique, Layout & drawing )
private

◆ minCliqueSize() [1/2]

 int ogdf::PlanarizationLayout::minCliqueSize ( ) const
inline

Returns the current setting of option minCliqueSize.

If preprocessing of cliques is considered, this option determines the minimal size of cliques to search for.

Definition at line 99 of file PlanarizationLayout.h.

◆ minCliqueSize() [2/2]

 void ogdf::PlanarizationLayout::minCliqueSize ( int i )
inline

Set the option minCliqueSize to i.

Definition at line 104 of file PlanarizationLayout.h.

◆ numberOfCrossings()

 int ogdf::PlanarizationLayout::numberOfCrossings ( ) const
inline

Returns the number of crossings in the computed layout.

Definition at line 158 of file PlanarizationLayout.h.

◆ pageRatio() [1/2]

 double ogdf::PlanarizationLayout::pageRatio ( ) const
inline

Returns the current setting of option pageRatio.

This option specifies the desired ration width / height of the computed layout. It is currently only used for packing connected components.

Definition at line 85 of file PlanarizationLayout.h.

◆ pageRatio() [2/2]

 void ogdf::PlanarizationLayout::pageRatio ( double ratio )
inline

Sets the option pageRatio to ratio.

Definition at line 90 of file PlanarizationLayout.h.

◆ preprocessCliques()

 void ogdf::PlanarizationLayout::preprocessCliques ( Graph & G, CliqueReplacer & cliqueReplacer )
private

◆ setCrossMin()

 void ogdf::PlanarizationLayout::setCrossMin ( CrossingMinimizationModule * pCrossMin )
inline

Sets the module option for crossing minimization.

Definition at line 115 of file PlanarizationLayout.h.

◆ setEmbedder()

 void ogdf::PlanarizationLayout::setEmbedder ( EmbedderModule * pEmbedder )
inline

Sets the module option for the graph embedding algorithm.

The result of the crossing minimization step is a planar graph, in which crossings are replaced by dummy nodes. The embedding module then computes a planar embedding of this planar graph.

Definition at line 125 of file PlanarizationLayout.h.

◆ setPacker()

 void ogdf::PlanarizationLayout::setPacker ( CCLayoutPackModule * pPacker )
inline

Sets the module option for the arrangement of connected components.

The planarization layout algorithm draws each connected component of the input graph seperately, and then arranges the resulting drawings using a packing algorithm.

Definition at line 148 of file PlanarizationLayout.h.

◆ setPlanarLayouter()

 void ogdf::PlanarizationLayout::setPlanarLayouter ( LayoutPlanRepModule * pPlanarLayouter )
inline

Sets the module option for the planar layout algorithm.

The planar layout algorithm is used to compute a planar layout of the planarized representation resulting from the crossing minimization step. Planarized representation means that edge crossings are replaced by dummy nodes of degree four, so the actual layout algorithm obtains a planar graph as input. By default, the planar layout algorithm produces an orthogonal drawing.

Definition at line 138 of file PlanarizationLayout.h.

◆ m_cliqueSize

 int ogdf::PlanarizationLayout::m_cliqueSize
private

The minimum size of cliques to search for.

Definition at line 190 of file PlanarizationLayout.h.

◆ m_crossMin

 std::unique_ptr ogdf::PlanarizationLayout::m_crossMin
private

The module for computing a planar subgraph.

Definition at line 176 of file PlanarizationLayout.h.

◆ m_embedder

 std::unique_ptr ogdf::PlanarizationLayout::m_embedder
private

The module for planar embedding.

Definition at line 179 of file PlanarizationLayout.h.

◆ m_nCrossings

 int ogdf::PlanarizationLayout::m_nCrossings
private

The number of crossings in the computed layout.

Definition at line 188 of file PlanarizationLayout.h.

◆ m_packer

 std::unique_ptr ogdf::PlanarizationLayout::m_packer
private

The module for arranging connected components.

Definition at line 185 of file PlanarizationLayout.h.

◆ m_pageRatio

 double ogdf::PlanarizationLayout::m_pageRatio
private

The desired page ratio.

Definition at line 187 of file PlanarizationLayout.h.

◆ m_planarLayouter

 std::unique_ptr ogdf::PlanarizationLayout::m_planarLayouter
private

The module for computing a planar layout.

Definition at line 182 of file PlanarizationLayout.h.

The documentation for this class was generated from the following file: