Open
Graph Drawing
Framework

 v.2015.05
 

ogdf::PlanarizationGridLayout Class Reference

The planarization grid layout algorithm. More...

#include <ogdf/planarity/PlanarizationGridLayout.h>

+ Inheritance diagram for ogdf::PlanarizationGridLayout:

Public Member Functions

 PlanarizationGridLayout ()
 Creates an instance of planarization layout and sets options to default values. More...
 
 ~PlanarizationGridLayout ()
 
Optional parameters
double pageRatio () const
 Returns the current setting of option pageRatio. More...
 
void pageRatio (double ratio)
 Sets the option pageRatio to ratio. More...
 
Module options
void setCrossMin (CrossingMinimizationModule *pCrossMin)
 Sets the module option for crossing minimization. More...
 
void setPlanarLayouter (GridLayoutPlanRepModule *pPlanarLayouter)
 Sets the module option for the planar grid 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 computed layout. More...
 
- Public Member Functions inherited from ogdf::GridLayoutModule
 GridLayoutModule ()
 Initializes a grid layout module. More...
 
virtual ~GridLayoutModule ()
 
void call (GraphAttributes &AG)
 Calls the grid layout algorithm (general call). More...
 
void callGrid (const Graph &G, GridLayout &gridLayout)
 Calls the grid layout algorithm (call for GridLayout). More...
 
const IPointgridBoundingBox () const
 
double separation () const
 Returns the current setting of the minimum distance between nodes. More...
 
void separation (double sep)
 Sets the minimum distance between nodes. More...
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module. More...
 
virtual ~LayoutModule ()
 
virtual void call (GraphAttributes &GA, GraphConstraints &GC)
 Computes a layout of graph GA wrt the constraints in GC (if applicable). More...
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA. More...
 

Protected Member Functions

void doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox)
 Implements the algorithm call. More...
 

Private Attributes

ModuleOption< CrossingMinimizationModulem_crossMin
 The module for computing a planar subgraph. More...
 
int m_nCrossings
 The number of crossings in the computed layout. More...
 
ModuleOption< CCLayoutPackModulem_packer
 The module for arranging connected components. More...
 
double m_pageRatio
 The desired page ratio. More...
 
ModuleOption< GridLayoutPlanRepModulem_planarLayouter
 The module for computing a planar grid layout. More...
 

Additional Inherited Members

- Protected Attributes inherited from ogdf::GridLayoutModule
IPoint m_gridBoundingBox
 The computed bounding box of the grid layout. More...
 

Detailed Description

The planarization grid layout algorithm.

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.

Optional parameters

OptionTypeDefaultDescription
pageRatiodouble1.0 Specifies the desired ration of width / height of the computed layout. It is currently only used when packing connected components.

Module options

The various phases of the algorithm can be exchanged by setting module options allowing flexible customization. The algorithm provides the following module options:

OptionTypeDefaultDescription
crossMinCrossingMinimizationModuleSubgraphPlanarizer The module used for the crossing minimization step.
planarLayouterGridLayoutPlanRepModuleMixedModelLayout The planar layout algorithm used to compute a planar layout of the planarized representation resulting from the crossing minimization step.
packerCCLayoutPackModuleTileToRowsCCPacker The packer module used for arranging connected components.

Definition at line 115 of file PlanarizationGridLayout.h.

Constructor & Destructor Documentation

ogdf::PlanarizationGridLayout::PlanarizationGridLayout ( )

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

ogdf::PlanarizationGridLayout::~PlanarizationGridLayout ( )
inline

Definition at line 121 of file PlanarizationGridLayout.h.

Member Function Documentation

void ogdf::PlanarizationGridLayout::doCall ( const Graph G,
GridLayout gridLayout,
IPoint boundingBox 
)
protectedvirtual

Implements the algorithm call.

A derived algorithm must implement this method and return the computed grid layout in gridLayout.

Parameters
Gis the input graph.
gridLayoutis assigned the computed grid layout.
boundingBoxreturns 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.

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

Returns the number of crossings in computed layout.

Definition at line 186 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 134 of file PlanarizationGridLayout.h.

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

Sets the option pageRatio to ratio.

Definition at line 139 of file PlanarizationGridLayout.h.

void ogdf::PlanarizationGridLayout::setCrossMin ( CrossingMinimizationModule pCrossMin)
inline

Sets the module option for crossing minimization.

Definition at line 149 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 175 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 164 of file PlanarizationGridLayout.h.

Member Data Documentation

ModuleOption<CrossingMinimizationModule> ogdf::PlanarizationGridLayout::m_crossMin
private

The module for computing a planar subgraph.

Definition at line 198 of file PlanarizationGridLayout.h.

int ogdf::PlanarizationGridLayout::m_nCrossings
private

The number of crossings in the computed layout.

Definition at line 208 of file PlanarizationGridLayout.h.

ModuleOption<CCLayoutPackModule> ogdf::PlanarizationGridLayout::m_packer
private

The module for arranging connected components.

Definition at line 204 of file PlanarizationGridLayout.h.

double ogdf::PlanarizationGridLayout::m_pageRatio
private

The desired page ratio.

Definition at line 206 of file PlanarizationGridLayout.h.

ModuleOption<GridLayoutPlanRepModule> ogdf::PlanarizationGridLayout::m_planarLayouter
private

The module for computing a planar grid layout.

Definition at line 201 of file PlanarizationGridLayout.h.


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