Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::GridLayoutPlanRepModule Class Referenceabstract

Base class for grid layout algorithms operating on a PlanRep. More...

#include <ogdf/planarlayout/GridLayoutModule.h>

+ Inheritance diagram for ogdf::GridLayoutPlanRepModule:

Public Member Functions

 GridLayoutPlanRepModule ()
 Initializes a plan-rep grid layout module. More...
 
virtual ~GridLayoutPlanRepModule ()
 
void callGrid (const Graph &G, GridLayout &gridLayout)
 Calls the grid layout algorithm (call for GridLayout). More...
 
void callGrid (PlanRep &PG, GridLayout &gridLayout)
 Calls the grid layout algorithm (call for GridLayout of a PlanRep). More...
 
void callGridFixEmbed (const Graph &G, GridLayout &gridLayout, adjEntry adjExternal=nullptr)
 Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout). More...
 
void callGridFixEmbed (PlanRep &PG, GridLayout &gridLayout, adjEntry adjExternal=nullptr)
 Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout of a PlanRep). More...
 
- Public Member Functions inherited from ogdf::PlanarGridLayoutModule
 PlanarGridLayoutModule ()
 Initializes a planar grid layout module. More...
 
virtual ~PlanarGridLayoutModule ()
 
void callFixEmbed (GraphAttributes &AG, adjEntry adjExternal=nullptr)
 Calls the grid layout algorithm with a fixed planar embedding (general call). More...
 
void callGridFixEmbed (const Graph &G, GridLayout &gridLayout, adjEntry adjExternal=nullptr)
 Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout). More...
 
- Public Member Functions inherited from ogdf::GridLayoutModule
 GridLayoutModule ()
 Initializes a grid layout module. More...
 
virtual ~GridLayoutModule ()
 
virtual void call (GraphAttributes &GA) override final
 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 ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA. More...
 

Protected Member Functions

void doCall (const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding) override
 Implements PlanarGridLayoutModule::doCall(). More...
 
virtual void doCall (const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding)=0
 Implements the algorithm call. More...
 
virtual void doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override
 Implements the GridLayoutModule::doCall(). More...
 
virtual void doCall (PlanRep &PG, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding)=0
 Implements the algorithm call. More...
 
- Protected Member Functions inherited from ogdf::PlanarGridLayoutModule
virtual void doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override
 Implements the GridLayoutModule::doCall(). More...
 
bool handleTrivial (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox)
 Handles the special cases of graphs with less than 3 nodes. More...
 

Additional Inherited Members

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

Detailed Description

Base class for grid layout algorithms operating on a PlanRep.

A GridLayoutPlanRepModule is a special class of a grid layout module that produces a planar layout of a planar graph, and that has a special call method (taking a PlanRep as input) for using the layout module within the planarization approach.

See also
PlanarizationGridLayout

Definition at line 223 of file GridLayoutModule.h.

Constructor & Destructor Documentation

◆ GridLayoutPlanRepModule()

ogdf::GridLayoutPlanRepModule::GridLayoutPlanRepModule ( )
inline

Initializes a plan-rep grid layout module.

Definition at line 227 of file GridLayoutModule.h.

◆ ~GridLayoutPlanRepModule()

virtual ogdf::GridLayoutPlanRepModule::~GridLayoutPlanRepModule ( )
inlinevirtual

Definition at line 229 of file GridLayoutModule.h.

Member Function Documentation

◆ callGrid() [1/2]

void ogdf::GridLayoutPlanRepModule::callGrid ( const Graph G,
GridLayout gridLayout 
)
inline

Calls the grid layout algorithm (call for GridLayout).

The implementation of this call method temporarily constructs a PlanRep and copies the resulting grid layout to the grid layout for the input graph.

Parameters
Gis the input graph.
gridLayoutis assigned the computed grid layout.

Definition at line 241 of file GridLayoutModule.h.

◆ callGrid() [2/2]

void ogdf::GridLayoutPlanRepModule::callGrid ( PlanRep PG,
GridLayout gridLayout 
)

Calls the grid layout algorithm (call for GridLayout of a PlanRep).

Parameters
PGis the input graph which may be modified by the algorithm.
gridLayoutis assigned the computed grid layout of PG.

◆ callGridFixEmbed() [1/2]

void ogdf::GridLayoutPlanRepModule::callGridFixEmbed ( const Graph G,
GridLayout gridLayout,
adjEntry  adjExternal = nullptr 
)
inline

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

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

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

Definition at line 263 of file GridLayoutModule.h.

◆ callGridFixEmbed() [2/2]

void ogdf::GridLayoutPlanRepModule::callGridFixEmbed ( PlanRep PG,
GridLayout gridLayout,
adjEntry  adjExternal = nullptr 
)

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

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

Parameters
PGis the input graph which may be modified by the algorithm.
gridLayoutis assigned the computed grid layout.
adjExternalspecifies an adjacency entry (of PG) on the external face, or is set to 0 if no particular external face shall be specified.

◆ doCall() [1/4]

void ogdf::GridLayoutPlanRepModule::doCall ( const Graph G,
adjEntry  adjExternal,
GridLayout gridLayout,
IPoint boundingBox,
bool  fixEmbedding 
)
overrideprotectedvirtual

◆ doCall() [2/4]

virtual void ogdf::PlanarGridLayoutModule::doCall
protected

Implements the algorithm call.

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

Parameters
Gis the input graph.
adjExternalis an adjacency entry on the external face, or 0 if no external face is specified.
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.
fixEmbeddingdetermines if the input graph is embedded and that embedding has to be preserved (true), or if an embedding needs to be computed (false).

◆ doCall() [3/4]

virtual void ogdf::PlanarGridLayoutModule::doCall
inlineoverrideprotected

Implements the GridLayoutModule::doCall().

Definition at line 196 of file GridLayoutModule.h.

◆ doCall() [4/4]

virtual void ogdf::GridLayoutPlanRepModule::doCall ( PlanRep PG,
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 of PG in gridLayout.

Parameters
PGis the input graph which may be modified by the algorithm.
adjExternalis an adjacency entry on the external face, or 0 if no external face is specified.
gridLayoutis assigned the computed grid layout.
boundingBoxis assigned the bounding box of the computed layout.
fixEmbeddingdetermines if the input graph is embedded and that embedding has to be preserved (true), or if an embedding needs to be computed (false).

Implemented in ogdf::MixedModelLayout.


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