# OpenGraph DrawingFramework

v.2012.07

ogdf::PlanarGridLayoutModule Class Reference

Base class for planar grid layout algorithms. More...

#include <ogdf/module/GridLayoutModule.h>

Inheritance diagram for ogdf::PlanarGridLayoutModule:

List of all members.

## Public Member Functions

PlanarGridLayoutModule ()
Initializes a planar grid layout module.
virtual ~PlanarGridLayoutModule ()
Calls the grid layout algorithm with a fixed planar embedding (general call).
void callGridFixEmbed (const Graph &G, GridLayout &gridLayout, adjEntry adjExternal=0)
Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout).
Public Member Functions inherited from ogdf::GridLayoutModule
GridLayoutModule ()
Initializes a grid layout module.
virtual ~GridLayoutModule ()
void call (GraphAttributes &AG)
Calls the grid layout algorithm (general call).
void callGrid (const Graph &G, GridLayout &gridLayout)
Calls the grid layout algorithm (call for GridLayout).
const IPointgridBoundingBox () const
double separation () const
Returns the current setting of the minimum distance between nodes.
void separation (double sep)
Sets the minimum distance between nodes.
Public Member Functions inherited from ogdf::LayoutModule
LayoutModule ()
Initializes a layout module.
virtual ~LayoutModule ()
virtual void call (GraphAttributes &GA, GraphConstraints &GC)
Computes a layout of graph GA wrt the constraints in GC (if applicable).
void operator() (GraphAttributes &GA)
Computes a layout of graph GA.

## Protected Member Functions

virtual void doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox)
Implements the algorithm call.
virtual void doCall (const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding)=0
Implements the algorithm call.

## Detailed Description

Base class for planar grid layout algorithms.

A planar grid layout algorithm is a grid layout algorithm that produces a crossing-free grid layout of a planar graph. It provides an additional call method for producing a planar layout with a predefined planar embedding.

Definition at line 158 of file GridLayoutModule.h.

## Constructor & Destructor Documentation

 ogdf::PlanarGridLayoutModule::PlanarGridLayoutModule ( )
inline

Initializes a planar grid layout module.

Definition at line 162 of file GridLayoutModule.h.

 virtual ogdf::PlanarGridLayoutModule::~PlanarGridLayoutModule ( )
inlinevirtual

Definition at line 164 of file GridLayoutModule.h.

## Member Function Documentation

 void ogdf::PlanarGridLayoutModule::callFixEmbed ( GraphAttributes & AG, adjEntry adjExternal = 0 )

Calls the grid layout algorithm with a fixed planar embedding (general call).

A derived algorithm implements the call by implementing doCall().

Parameters:
 AG is the input graph; the new layout is also stored in AG. adjExternal specifies an adjacency entry on the external face, or is set to 0 if no particular external face shall be specified.
 void ogdf::PlanarGridLayoutModule::callGridFixEmbed ( const Graph & G, GridLayout & gridLayout, adjEntry adjExternal = 0 )

Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout).

A derived algorithm implements the call by implementing doCall().

Parameters:
 G is the input graph. gridLayout is assigned the computed grid layout. adjExternal specifies an adjacency entry (of G) on the external face, or is set to 0 if no particular external face shall be specified.

Reimplemented in ogdf::GridLayoutPlanRepModule.

 virtual void ogdf::PlanarGridLayoutModule::doCall ( const Graph & G, GridLayout & gridLayout, IPoint & boundingBox )
inlineprotectedvirtual

Implements the algorithm call.

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.

Definition at line 199 of file GridLayoutModule.h.

 virtual void ogdf::PlanarGridLayoutModule::doCall ( const Graph & G, adjEntry adjExternal, GridLayout & gridLayout, IPoint & boundingBox, bool fixEmbedding )
protectedpure 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. adjExternal is an adjacency entry on the external face, or 0 if no external face is specified. 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. fixEmbedding determines if the input graph is embedded and that embedding has to be preserved (true), or if an embedding needs to be computed (false).

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