#include <PlanarizationGridLayout.h>

Public Member Functions | |
| PlanarizationGridLayout () | |
| Creates an instance of planarization layout and sets options to default values. | |
| ~PlanarizationGridLayout () | |
Optional parameters | |
| double | pageRatio () const |
| Returns the current setting of option pageRatio. | |
| void | pageRatio (double ratio) |
| Sets the option pageRatio to ratio. | |
Module options | |
| void | setSubgraph (PlanarSubgraphModule *pSubgraph) |
| Sets the module option for the computation of the planar subgraph. | |
| void | setInserter (EdgeInsertionModule *pInserter) |
| Sets the module option for edge insertion. | |
| void | setPlanarLayouter (GridLayoutPlanRepModule *pPlanarLayouter) |
| Sets the module option for the planar grid 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 computed layout. | |
Protected Member Functions | |
| void | doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) |
| Implements the algorithm call. | |
Private Attributes | |
| ModuleOption < PlanarSubgraphModule > | m_subgraph |
| The module for computing a planar subgraph. | |
| ModuleOption< EdgeInsertionModule > | m_inserter |
| The module for edge re-insertion. | |
| ModuleOption < GridLayoutPlanRepModule > | m_planarLayouter |
| The module for computing a planar grid layout. | |
| ModuleOption< CCLayoutPackModule > | m_packer |
| The module for arranging connected components. | |
| double | m_pageRatio |
| The desired page ratio. | |
| int | m_nCrossings |
| The number of crossings in the computed layout. | |
The class PlanarizationGridLayout represents a customizable implementation of the planarization approach for drawing graphs. The class uses a planar grid layout algorithm as a subroutine and allows to generate a usual layout or a grid layout.
If the planarization layout algorithm shall be used for simultaneous drawing, you need to define the different subgraphs by setting the subgraphs option.
The implementation used in PlanarizationGridLayout is based on the following publication:
C. Gutwenger, P. Mutzel: An Experimental Study of Crossing Minimization Heuristics. 11th International Symposium on Graph Drawing 2003, Perugia (GD '03), LNCS 2912, pp. 13-24, 2004.
| Option | Type | Default | Description |
|---|---|---|---|
| pageRatio | double | 1.0 | Specifies the desired ration of width / height of the computed layout. It is currently only used when packing connected components. |
The various phases of the algorithm can be exchanged by setting module options allowing flexible customization. The algorithm provides the following module options:
| Option | Type | Default | Description |
|---|---|---|---|
| subgraph | PlanarSubgraphModule | MaximalPlanarSubgraphSimple | The module for the computation of the planar subgraph. |
| inserter | EdgeInsertionModule | FixedEmbeddingInserter | The module used for edge insertion which is applied in the second step of the planarization method. The edges not contained in the planar subgraph are re-inserted one-by-one, each with as few crossings as possible. |
| planarLayouter | LayoutPlanRepModule | TileToRowsCCPacker | The planar layout algorithm used to compute a planar layout of the planarized representation resulting from the crossing minimization step. |
| packer | CCLayoutPackModule | SimpleEmbedder | The packer module used for arranging connected components. |
Definition at line 129 of file PlanarizationGridLayout.h.
| ogdf::PlanarizationGridLayout::PlanarizationGridLayout | ( | ) |
Creates an instance of planarization layout and sets options to default values.
| ogdf::PlanarizationGridLayout::~PlanarizationGridLayout | ( | ) | [inline] |
Definition at line 135 of file PlanarizationGridLayout.h.
| double ogdf::PlanarizationGridLayout::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 148 of file PlanarizationGridLayout.h.
| void ogdf::PlanarizationGridLayout::pageRatio | ( | double | ratio | ) | [inline] |
| void ogdf::PlanarizationGridLayout::setSubgraph | ( | PlanarSubgraphModule * | pSubgraph | ) | [inline] |
Sets the module option for the computation of the planar subgraph.
The computation of a planar subgraph is the first step in the crossing minimization procedure of the planarization approach.
Definition at line 168 of file PlanarizationGridLayout.h.
| void ogdf::PlanarizationGridLayout::setInserter | ( | EdgeInsertionModule * | pInserter | ) | [inline] |
Sets the module option for edge insertion.
The edge insertion module is applied in the second step of the planarization method. The edges not contained in the planar subgraph are re-inserted one-by-one, each with as few crossings as possible. The edge insertion module implements the whole second step, i.e., it inserts all edges.
Definition at line 180 of file PlanarizationGridLayout.h.
| void ogdf::PlanarizationGridLayout::setPlanarLayouter | ( | GridLayoutPlanRepModule * | pPlanarLayouter | ) | [inline] |
Sets the module option for the planar grid 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 194 of file PlanarizationGridLayout.h.
| void ogdf::PlanarizationGridLayout::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 205 of file PlanarizationGridLayout.h.
| int ogdf::PlanarizationGridLayout::numberOfCrossings | ( | ) | const [inline] |
Returns the number of crossings in computed layout.
Definition at line 216 of file PlanarizationGridLayout.h.
| void ogdf::PlanarizationGridLayout::doCall | ( | const Graph & | G, | |
| GridLayout & | gridLayout, | |||
| IPoint & | boundingBox | |||
| ) | [protected, virtual] |
Implements the algorithm call.
A derived algorithm must implement this method and return the computed grid layout in gridLayout.
| G | is the input graph. | |
| gridLayout | is assigned the computed grid layout. | |
| boundingBox | returns the bounding box of the grid layout. The lower left corner of the bounding box is always (0,0), thus this IPoint defines the upper right corner as well as the width and height of the grid layout. |
Implements ogdf::GridLayoutModule.
The module for computing a planar subgraph.
Definition at line 228 of file PlanarizationGridLayout.h.
The module for computing a planar grid layout.
Definition at line 234 of file PlanarizationGridLayout.h.
The module for arranging connected components.
Definition at line 237 of file PlanarizationGridLayout.h.
double ogdf::PlanarizationGridLayout::m_pageRatio [private] |
int ogdf::PlanarizationGridLayout::m_nCrossings [private] |
The number of crossings in the computed layout.
Definition at line 241 of file PlanarizationGridLayout.h.