Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
 ~PlanarizationLayout ()
 Destructor.
 
void call (GraphAttributes &ga) override
 Calls planarization layout for GraphAttributes ga.
 
void call (GraphAttributes &ga, Graph &g)
 Calls planarization layout with clique handling for GraphAttributes ga with associated graph g.
 
void callSimDraw (GraphAttributes &ga)
 
Optional parameters
double pageRatio () const
 Returns the current setting of option pageRatio.
 
void pageRatio (double ratio)
 Sets the option pageRatio to ratio.
 
int minCliqueSize () const
 Returns the current setting of option minCliqueSize.
 
void minCliqueSize (int i)
 Set the option minCliqueSize to i.
 
Module options
void setCrossMin (CrossingMinimizationModule *pCrossMin)
 Sets the module option for crossing minimization.
 
void setEmbedder (EmbedderModule *pEmbedder)
 Sets the module option for the graph embedding algorithm.
 
void setPlanarLayouter (LayoutPlanRepModule *pPlanarLayouter)
 Sets the module option for the planar layout algorithm.
 
void setPacker (CCLayoutPackModule *pPacker)
 Sets the module option for the arrangement of connected components.
 
Further information
int numberOfCrossings () const
 Returns the number of crossings in the computed layout.
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module.
 
virtual ~LayoutModule ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA.
 

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.
 
std::unique_ptr< CrossingMinimizationModulem_crossMin
 The module for computing a planar subgraph.
 
std::unique_ptr< EmbedderModulem_embedder
 The module for planar embedding.
 
int m_nCrossings
 The number of crossings in the computed layout.
 
std::unique_ptr< CCLayoutPackModulem_packer
 The module for arranging connected components.
 
double m_pageRatio
 The desired page ratio.
 
std::unique_ptr< LayoutPlanRepModulem_planarLayouter
 The module for computing a planar layout.
 

Detailed Description

The planarization approach for drawing graphs.

Definition at line 49 of file PlanarizationLayout.h.

Member Typedef Documentation

◆ CliqueReplacer

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ 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
gais 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)

◆ fillAdjNodes()

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 96 of file PlanarizationLayout.h.

◆ minCliqueSize() [2/2]

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

Set the option minCliqueSize to i.

Definition at line 99 of file PlanarizationLayout.h.

◆ numberOfCrossings()

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

Returns the number of crossings in the computed layout.

Definition at line 144 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 86 of file PlanarizationLayout.h.

◆ pageRatio() [2/2]

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

Sets the option pageRatio to ratio.

Definition at line 89 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 107 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 115 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 136 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 126 of file PlanarizationLayout.h.

Member Data Documentation

◆ m_cliqueSize

int ogdf::PlanarizationLayout::m_cliqueSize
private

The minimum size of cliques to search for.

Definition at line 171 of file PlanarizationLayout.h.

◆ m_crossMin

std::unique_ptr<CrossingMinimizationModule> ogdf::PlanarizationLayout::m_crossMin
private

The module for computing a planar subgraph.

Definition at line 157 of file PlanarizationLayout.h.

◆ m_embedder

std::unique_ptr<EmbedderModule> ogdf::PlanarizationLayout::m_embedder
private

The module for planar embedding.

Definition at line 160 of file PlanarizationLayout.h.

◆ m_nCrossings

int ogdf::PlanarizationLayout::m_nCrossings
private

The number of crossings in the computed layout.

Definition at line 169 of file PlanarizationLayout.h.

◆ m_packer

std::unique_ptr<CCLayoutPackModule> ogdf::PlanarizationLayout::m_packer
private

The module for arranging connected components.

Definition at line 166 of file PlanarizationLayout.h.

◆ m_pageRatio

double ogdf::PlanarizationLayout::m_pageRatio
private

The desired page ratio.

Definition at line 168 of file PlanarizationLayout.h.

◆ m_planarLayouter

std::unique_ptr<LayoutPlanRepModule> ogdf::PlanarizationLayout::m_planarLayouter
private

The module for computing a planar layout.

Definition at line 163 of file PlanarizationLayout.h.


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