Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::PlanarizationGridLayout Class Reference

The planarization grid layout algorithm. More...

#include <PlanarizationGridLayout.h>

Inheritance diagram for ogdf::PlanarizationGridLayout:

ogdf::GridLayoutModule ogdf::LayoutModule

List of all members.

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< EdgeInsertionModulem_inserter
 The module for edge re-insertion.
ModuleOption
< GridLayoutPlanRepModule
m_planarLayouter
 The module for computing a planar grid layout.
ModuleOption< CCLayoutPackModulem_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.


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
subgraphPlanarSubgraphModuleMaximalPlanarSubgraphSimple The module for the computation of the planar subgraph.
inserterEdgeInsertionModuleFixedEmbeddingInserter 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.
planarLayouterLayoutPlanRepModuleTileToRowsCCPacker The planar layout algorithm used to compute a planar layout of the planarized representation resulting from the crossing minimization step.
packerCCLayoutPackModuleSimpleEmbedder The packer module used for arranging connected components.

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


Member Function Documentation

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]

Sets the option pageRatio to ratio.

Definition at line 153 of file PlanarizationGridLayout.h.

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.

Parameters:
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.


Member Data Documentation

ModuleOption<PlanarSubgraphModule> ogdf::PlanarizationGridLayout::m_subgraph [private]

The module for computing a planar subgraph.

Definition at line 228 of file PlanarizationGridLayout.h.

ModuleOption<EdgeInsertionModule> ogdf::PlanarizationGridLayout::m_inserter [private]

The module for edge re-insertion.

Definition at line 231 of file PlanarizationGridLayout.h.

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

The module for computing a planar grid layout.

Definition at line 234 of file PlanarizationGridLayout.h.

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

The module for arranging connected components.

Definition at line 237 of file PlanarizationGridLayout.h.

double ogdf::PlanarizationGridLayout::m_pageRatio [private]

The desired page ratio.

Definition at line 239 of file PlanarizationGridLayout.h.

int ogdf::PlanarizationGridLayout::m_nCrossings [private]

The number of crossings in the computed layout.

Definition at line 241 of file PlanarizationGridLayout.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:13 2007 by doxygen 1.5.4.