The planarization approach for drawing graphs. More...
#include <ogdf/planarity/PlanarizationLayout.h>
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< CrossingMinimizationModule > | m_crossMin |
The module for computing a planar subgraph. More... | |
std::unique_ptr< EmbedderModule > | m_embedder |
The module for planar embedding. More... | |
int | m_nCrossings |
The number of crossings in the computed layout. More... | |
std::unique_ptr< CCLayoutPackModule > | m_packer |
The module for arranging connected components. More... | |
double | m_pageRatio |
The desired page ratio. More... | |
std::unique_ptr< LayoutPlanRepModule > | m_planarLayouter |
The module for computing a planar layout. More... | |
The planarization approach for drawing graphs.
Definition at line 59 of file PlanarizationLayout.h.
Definition at line 159 of file PlanarizationLayout.h.
ogdf::PlanarizationLayout::PlanarizationLayout | ( | ) |
Creates an instance of planarization layout and sets options to default values.
|
inline |
Destructor.
Definition at line 65 of file PlanarizationLayout.h.
|
private |
|
overridevirtual |
Calls planarization layout for GraphAttributes ga
.
ga | is the input graph and will also be assigned the layout information. |
Implements ogdf::LayoutModule.
void ogdf::PlanarizationLayout::call | ( | GraphAttributes & | ga, |
Graph & | g | ||
) |
Calls planarization layout with clique handling for GraphAttributes ga
with associated graph g
.
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.
void ogdf::PlanarizationLayout::callSimDraw | ( | GraphAttributes & | ga | ) |
|
private |
|
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 106 of file PlanarizationLayout.h.
|
inline |
Set the option minCliqueSize to i
.
Definition at line 109 of file PlanarizationLayout.h.
|
inline |
Returns the number of crossings in the computed layout.
Definition at line 154 of file PlanarizationLayout.h.
|
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 96 of file PlanarizationLayout.h.
|
inline |
Sets the option pageRatio to ratio
.
Definition at line 99 of file PlanarizationLayout.h.
|
private |
|
inline |
Sets the module option for crossing minimization.
Definition at line 117 of file PlanarizationLayout.h.
|
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.
|
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 146 of file PlanarizationLayout.h.
|
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 136 of file PlanarizationLayout.h.
|
private |
The minimum size of cliques to search for.
Definition at line 181 of file PlanarizationLayout.h.
|
private |
The module for computing a planar subgraph.
Definition at line 167 of file PlanarizationLayout.h.
|
private |
The module for planar embedding.
Definition at line 170 of file PlanarizationLayout.h.
|
private |
The number of crossings in the computed layout.
Definition at line 179 of file PlanarizationLayout.h.
|
private |
The module for arranging connected components.
Definition at line 176 of file PlanarizationLayout.h.
|
private |
The desired page ratio.
Definition at line 178 of file PlanarizationLayout.h.
|
private |
The module for computing a planar layout.
Definition at line 173 of file PlanarizationLayout.h.