Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

Protected Member Functions

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

Additional Inherited Members

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

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 207 of file GridLayoutModule.h.

Constructor & Destructor Documentation

◆ GridLayoutPlanRepModule()

ogdf::GridLayoutPlanRepModule::GridLayoutPlanRepModule ( )
inline

Initializes a plan-rep grid layout module.

Definition at line 210 of file GridLayoutModule.h.

◆ ~GridLayoutPlanRepModule()

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

Definition at line 212 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 224 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 246 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 ( const Graph G,
adjEntry  adjExternal,
GridLayout gridLayout,
IPoint boundingBox,
bool  fixEmbedding 
)
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.
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).

Implements ogdf::PlanarGridLayoutModule.

◆ doCall() [3/4]

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

Implements the GridLayoutModule::doCall().

Reimplemented from ogdf::PlanarGridLayoutModule.

Definition at line 185 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: