Base class for planar grid layout algorithms. More...
#include <ogdf/planarlayout/GridLayoutModule.h>
Public Member Functions | |
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 IPoint & | gridBoundingBox () 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 | |
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... | |
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... | |
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 138 of file GridLayoutModule.h.
|
inline |
Initializes a planar grid layout module.
Definition at line 141 of file GridLayoutModule.h.
|
inlinevirtual |
Definition at line 143 of file GridLayoutModule.h.
void ogdf::PlanarGridLayoutModule::callFixEmbed | ( | GraphAttributes & | AG, |
adjEntry | adjExternal = nullptr |
||
) |
Calls the grid layout algorithm with a fixed planar embedding (general call).
A derived algorithm implements the call by implementing doCall().
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 = nullptr |
||
) |
Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout).
A derived algorithm implements the call by implementing doCall().
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. |
|
protectedpure virtual |
Implements the algorithm call.
A derived algorithm must implement this method and return the computed grid layout in gridLayout
.
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). |
Implemented in ogdf::GridLayoutPlanRepModule, ogdf::PlanarDrawLayout, ogdf::PlanarStraightLayout, ogdf::SchnyderLayout, and ogdf::FPPLayout.
|
inlineoverrideprotectedvirtual |
Implements the GridLayoutModule::doCall().
Implements ogdf::GridLayoutModule.
Definition at line 190 of file GridLayoutModule.h.
|
protected |
Handles the special cases of graphs with less than 3 nodes.