Open
Graph Drawing
Framework

 v.2015.05
 

ogdf::PlanarizationLayout Class Reference

The planarization approach for drawing graphs. More...

#include <ogdf/planarity/PlanarizationLayout.h>

+ Inheritance diagram for ogdf::PlanarizationLayout:

Public Member Functions

 PlanarizationLayout ()
 Creates an instance of planarization layout and sets options to default values. More...
 
 ~PlanarizationLayout ()
 Destructor. More...
 
void call (GraphAttributes &ga)
 Calls planarization layout for GraphAttributes ga. More...
 
void call (GraphAttributes &ga, GraphConstraints &gc)
 Computes a layout of graph GA wrt the constraints in GC (if applicable). More...
 
void call (GraphAttributes &ga, Graph &g)
 Calls planarization layout with clique handling for GraphAttributes ga with associated graph g. More...
 
void callSimDraw (GraphAttributes &ga)
 
Optional parameters
double pageRatio () const
 Returns the current setting of option pageRatio. More...
 
void pageRatio (double ratio)
 Sets the option pageRatio to ratio. More...
 
int minCliqueSize () const
 Returns the current setting of option minCliqueSize. More...
 
void minCliqueSize (int i)
 Set the option minCliqueSize to i. More...
 
Module options
void setCrossMin (CrossingMinimizationModule *pCrossMin)
 Sets the module option for crossing minimization. More...
 
void setEmbedder (EmbedderModule *pEmbedder)
 Sets the module option for the graph embedding algorithm. More...
 
void setPlanarLayouter (LayoutPlanRepModule *pPlanarLayouter)
 Sets the module option for the planar layout algorithm. More...
 
void setPacker (CCLayoutPackModule *pPacker)
 Sets the module option for the arrangement of connected components. More...
 
Further information
int numberOfCrossings () const
 Returns the number of crossings in the computed layout. 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...
 

Private Member Functions

void arrangeCCs (PlanRep &PG, GraphAttributes &GA, Array< DPoint > &boundingBox) const
 
void fillAdjNodes (List< node > &adjNodes, PlanRep &PG, node centerNode, NodeArray< bool > &isClique, Layout &drawing)
 
void preprocessCliques (Graph &G, CliqueReplacer &cliqueReplacer)
 

Private Attributes

int m_cliqueSize
 The minimum size of cliques to search for. More...
 
ModuleOption< CrossingMinimizationModulem_crossMin
 The module for computing a planar subgraph. More...
 
ModuleOption< EmbedderModulem_embedder
 The module for planar embedding. More...
 
int m_nCrossings
 The number of crossings in the computed layout. More...
 
ModuleOption< CCLayoutPackModulem_packer
 The module for arranging connected components. More...
 
double m_pageRatio
 The desired page ratio. More...
 
ModuleOption< LayoutPlanRepModulem_planarLayouter
 The module for computing a planar layout. More...
 

Detailed Description

The planarization approach for drawing graphs.

Definition at line 67 of file PlanarizationLayout.h.

Constructor & Destructor Documentation

ogdf::PlanarizationLayout::PlanarizationLayout ( )

Creates an instance of planarization layout and sets options to default values.

ogdf::PlanarizationLayout::~PlanarizationLayout ( )
inline

Destructor.

Definition at line 74 of file PlanarizationLayout.h.

Member Function Documentation

void ogdf::PlanarizationLayout::arrangeCCs ( PlanRep PG,
GraphAttributes GA,
Array< DPoint > &  boundingBox 
) const
private
void ogdf::PlanarizationLayout::call ( GraphAttributes ga)
virtual

Calls planarization layout for GraphAttributes ga.

Precondition
The graph has no self-loops.
Parameters
gais the input graph and will also be assigned the layout information.

Implements ogdf::LayoutModule.

void ogdf::PlanarizationLayout::call ( GraphAttributes GA,
GraphConstraints GC 
)
inlinevirtual

Computes a layout of graph GA wrt the constraints in GC (if applicable).

Reimplemented from ogdf::LayoutModule.

Definition at line 83 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::call ( GraphAttributes ga,
Graph g 
)

Calls planarization layout with clique handling for GraphAttributes ga with associated graph g.

Precondition
g is the graph associated with graph attributes ga.

This call perfoms a special handling for cliques, which are temporarily replaced by a star graph. In the final drawing, the clique edges are drawn straight-line.

void ogdf::PlanarizationLayout::callSimDraw ( GraphAttributes ga)
void ogdf::PlanarizationLayout::fillAdjNodes ( List< node > &  adjNodes,
PlanRep PG,
node  centerNode,
NodeArray< bool > &  isClique,
Layout drawing 
)
private
int ogdf::PlanarizationLayout::minCliqueSize ( ) const
inline

Returns the current setting of option minCliqueSize.

If preprocessing of cliques is considered, this option determines the minimal size of cliques to search for.

Definition at line 120 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::minCliqueSize ( int  i)
inline

Set the option minCliqueSize to i.

Definition at line 125 of file PlanarizationLayout.h.

int ogdf::PlanarizationLayout::numberOfCrossings ( ) const
inline

Returns the number of crossings in the computed layout.

Definition at line 179 of file PlanarizationLayout.h.

double ogdf::PlanarizationLayout::pageRatio ( ) const
inline

Returns the current setting of option pageRatio.

This option specifies the desired ration width / height of the computed layout. It is currently only used for packing connected components.

Definition at line 106 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::pageRatio ( double  ratio)
inline

Sets the option pageRatio to ratio.

Definition at line 111 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::preprocessCliques ( Graph G,
CliqueReplacer cliqueReplacer 
)
private
void ogdf::PlanarizationLayout::setCrossMin ( CrossingMinimizationModule pCrossMin)
inline

Sets the module option for crossing minimization.

Definition at line 136 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::setEmbedder ( EmbedderModule pEmbedder)
inline

Sets the module option for the graph embedding algorithm.

The result of the crossing minimization step is a planar graph, in which crossings are replaced by dummy nodes. The embedding module then computes a planar embedding of this planar graph.

Definition at line 146 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::setPacker ( CCLayoutPackModule pPacker)
inline

Sets the module option for the arrangement of connected components.

The planarization layout algorithm draws each connected component of the input graph seperately, and then arranges the resulting drawings using a packing algorithm.

Definition at line 169 of file PlanarizationLayout.h.

void ogdf::PlanarizationLayout::setPlanarLayouter ( LayoutPlanRepModule pPlanarLayouter)
inline

Sets the module option for the planar layout algorithm.

The planar layout algorithm is used to compute a planar layout of the planarized representation resulting from the crossing minimization step. Planarized representation means that edge crossings are replaced by dummy nodes of degree four, so the actual layout algorithm obtains a planar graph as input. By default, the planar layout algorithm produces an orthogonal drawing.

Definition at line 159 of file PlanarizationLayout.h.

Member Data Documentation

int ogdf::PlanarizationLayout::m_cliqueSize
private

The minimum size of cliques to search for.

Definition at line 209 of file PlanarizationLayout.h.

ModuleOption<CrossingMinimizationModule> ogdf::PlanarizationLayout::m_crossMin
private

The module for computing a planar subgraph.

Definition at line 195 of file PlanarizationLayout.h.

ModuleOption<EmbedderModule> ogdf::PlanarizationLayout::m_embedder
private

The module for planar embedding.

Definition at line 198 of file PlanarizationLayout.h.

int ogdf::PlanarizationLayout::m_nCrossings
private

The number of crossings in the computed layout.

Definition at line 207 of file PlanarizationLayout.h.

ModuleOption<CCLayoutPackModule> ogdf::PlanarizationLayout::m_packer
private

The module for arranging connected components.

Definition at line 204 of file PlanarizationLayout.h.

double ogdf::PlanarizationLayout::m_pageRatio
private

The desired page ratio.

Definition at line 206 of file PlanarizationLayout.h.

ModuleOption<LayoutPlanRepModule> ogdf::PlanarizationLayout::m_planarLayouter
private

The module for computing a planar layout.

Definition at line 201 of file PlanarizationLayout.h.


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