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. | |
~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< CrossingMinimizationModule > | m_crossMin |
The module for computing a planar subgraph. | |
std::unique_ptr< EmbedderModule > | m_embedder |
The module for planar embedding. | |
int | m_nCrossings |
The number of crossings in the computed layout. | |
std::unique_ptr< CCLayoutPackModule > | m_packer |
The module for arranging connected components. | |
double | m_pageRatio |
The desired page ratio. | |
std::unique_ptr< LayoutPlanRepModule > | m_planarLayouter |
The module for computing a planar layout. | |
The planarization approach for drawing graphs.
Definition at line 49 of file PlanarizationLayout.h.
Definition at line 149 of file PlanarizationLayout.h.
ogdf::PlanarizationLayout::PlanarizationLayout | ( | ) |
Creates an instance of planarization layout and sets options to default values.
|
inline |
Destructor.
Definition at line 55 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 96 of file PlanarizationLayout.h.
Set the option minCliqueSize to i
.
Definition at line 99 of file PlanarizationLayout.h.
|
inline |
Returns the number of crossings in the computed layout.
Definition at line 144 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 86 of file PlanarizationLayout.h.
Sets the option pageRatio to ratio
.
Definition at line 89 of file PlanarizationLayout.h.
|
private |
|
inline |
Sets the module option for crossing minimization.
Definition at line 107 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 115 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 136 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 126 of file PlanarizationLayout.h.
|
private |
The minimum size of cliques to search for.
Definition at line 171 of file PlanarizationLayout.h.
|
private |
The module for computing a planar subgraph.
Definition at line 157 of file PlanarizationLayout.h.
|
private |
The module for planar embedding.
Definition at line 160 of file PlanarizationLayout.h.
|
private |
The number of crossings in the computed layout.
Definition at line 169 of file PlanarizationLayout.h.
|
private |
The module for arranging connected components.
Definition at line 166 of file PlanarizationLayout.h.
|
private |
The desired page ratio.
Definition at line 168 of file PlanarizationLayout.h.
|
private |
The module for computing a planar layout.
Definition at line 163 of file PlanarizationLayout.h.