Base class for grid layout algorithms operating on a PlanRep. More...
#include <ogdf/planarlayout/GridLayoutModule.h>
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 IPoint & | gridBoundingBox () 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. | |
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.
Definition at line 207 of file GridLayoutModule.h.
|
inline |
Initializes a plan-rep grid layout module.
Definition at line 210 of file GridLayoutModule.h.
|
inlinevirtual |
Definition at line 212 of file GridLayoutModule.h.
|
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.
G | is the input graph. |
gridLayout | is assigned the computed grid layout. |
Definition at line 224 of file GridLayoutModule.h.
void ogdf::GridLayoutPlanRepModule::callGrid | ( | PlanRep & | PG, |
GridLayout & | gridLayout | ||
) |
Calls the grid layout algorithm (call for GridLayout of a PlanRep).
PG | is the input graph which may be modified by the algorithm. |
gridLayout | is assigned the computed grid layout of PG . |
|
inline |
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. |
Definition at line 246 of file GridLayoutModule.h.
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().
PG | is the input graph which may be modified by the algorithm. |
gridLayout | is assigned the computed grid layout. |
adjExternal | specifies an adjacency entry (of PG ) on the external face, or is set to 0 if no particular external face shall be specified. |
|
overrideprotectedvirtual |
Implements PlanarGridLayoutModule::doCall().
Implements ogdf::PlanarGridLayoutModule.
|
protectedvirtual |
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). |
Implements ogdf::PlanarGridLayoutModule.
|
inlineoverrideprotectedvirtual |
Implements the GridLayoutModule::doCall().
Reimplemented from ogdf::PlanarGridLayoutModule.
Definition at line 185 of file GridLayoutModule.h.
|
protectedpure virtual |
Implements the algorithm call.
A derived algorithm must implement this method and return the computed grid layout of PG
in gridLayout
.
PG | is the input graph which may be modified by the algorithm. |
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 | is assigned the bounding box of the computed 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::MixedModelLayout.