Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::EmbedderMaxFaceLayers Class Reference

Planar graph embedding with maximum external face (plus layers approach). More...

#include <ogdf/planarity/EmbedderMaxFaceLayers.h>

+ Inheritance diagram for ogdf::EmbedderMaxFaceLayers:

Public Member Functions

 EmbedderMaxFaceLayers ()
 
 ~EmbedderMaxFaceLayers ()
 
virtual void doCall (Graph &G, adjEntry &adjExternal) override
 Computes an embedding of G with maximum external face. More...
 
- Public Member Functions inherited from ogdf::EmbedderModule
 EmbedderModule ()
 Initializes an embedder module. More...
 
virtual ~EmbedderModule ()
 
void call (Graph &G, adjEntry &adjExternal)
 Calls the embedder algorithm for graph G. More...
 
void operator() (Graph &G, adjEntry &adjExternal)
 Calls the embedder algorithm for graph G. More...
 
- Public Member Functions inherited from ogdf::Module
 Module ()
 Initializes a module. More...
 
virtual ~Module ()
 
- Public Member Functions inherited from ogdf::Timeouter
 Timeouter ()
 timeout is turned of by default More...
 
 Timeouter (double t)
 timeout is set to the given value (seconds) More...
 
 Timeouter (bool t)
 timeout is turned off (false) or on (true) (with 0 second) More...
 
 Timeouter (const Timeouter &t)
 
 ~Timeouter ()
 
bool isTimeLimit () const
 returns whether any time limit is set or not More...
 
Timeouter & operator= (const Timeouter &t)
 
void timeLimit (double t)
 sets the time limit for the call (in seconds); <0 means no limit. More...
 
void timeLimit (bool t)
 shorthand to turn timelimit off or on (with 0 seconds) More...
 
double timeLimit () const
 returns the current time limit for the call More...
 

Private Member Functions

void computeBlockGraphs (const node &bT, const node &cH)
 Computes recursively the block graph for every block. More...
 
int constraintMaxFace (const node &bT, const node &cH)
 Bottom up traversal of BC-tree. More...
 
void embedBlock (const node &bT)
 Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT. More...
 
void embedBlock (const node &bT, const node &cT, ListIterator< adjEntry > &after)
 Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT. More...
 
void maximumFaceRec (const node &bT, node &bT_opt, int &ell_opt)
 Top down traversal of BC-tree. More...
 

Private Attributes

NodeArray< Graph > blockG
 all blocks More...
 
NodeArray< NodeArray< int > > cstrLength
 is saving for each node in the block graphs its cstrLength More...
 
NodeArray< EdgeArray< edge > > eBlockEmbedding_to_eH
 a mapping of edges in blockG to the auxiliaryGraph of the BC-tree More...
 
NodeArray< EdgeArray< edge > > eH_to_eBlockEmbedding
 a mapping of edges in the auxiliaryGraph of the BC-tree to blockG More...
 
NodeArray< NodeArray< node > > nBlockEmbedding_to_nH
 a mapping of nodes in blockG to the auxiliaryGraph of the BC-tree More...
 
NodeArray< List< adjEntry > > newOrder
 saves for every node of G the new adjacency list More...
 
NodeArray< NodeArray< node > > nH_to_nBlockEmbedding
 a mapping of nodes in the auxiliaryGraph of the BC-tree to blockG More...
 
NodeArray< NodeArray< int > > nodeLength
 saving for each node in the block graphs its length More...
 
adjEntry * pAdjExternal
 an adjacency entry on the external face More...
 
BCTree * pBCTree
 BC-tree of the original graph. More...
 
NodeArray< StaticSPQRTree * > spqrTrees
 The SPQR-trees of the blocks. More...
 
NodeArray< bool > treeNodeTreated
 treeNodeTreated saves for all block nodes in the BC-tree if it has already been treated or not. More...
 

Additional Inherited Members

- Public Types inherited from ogdf::Module
enum  ReturnType { ReturnType::Feasible, ReturnType::Optimal, ReturnType::NoFeasibleSolution, ReturnType::TimeoutFeasible, ReturnType::TimeoutInfeasible, ReturnType::Error }
 The return type of a module. More...
 
- Static Public Member Functions inherited from ogdf::Module
static bool isSolution (ReturnType ret)
 Returns true iff ret indicates that the module returned a feasible solution. More...
 
- Protected Attributes inherited from ogdf::Timeouter
double m_timeLimit
 Time limit for module calls (< 0 means no limit). More...
 

Detailed Description

Planar graph embedding with maximum external face (plus layers approach).

See the paper "Graph Embedding with Minimum Depth and Maximum External Face" by C. Gutwenger and P. Mutzel (2004) for details. The algorithm for maximum external face is combined with the algorithm for maximum external layers which defines how to embed blocks into inner faces. See diploma thesis "Algorithmen zur Bestimmung von guten Graph-Einbettungen für orthogonale Zeichnungen" (in german) by Thorsten Kerkhof (2007) for details.

Definition at line 52 of file EmbedderMaxFaceLayers.h.

Constructor & Destructor Documentation

◆ EmbedderMaxFaceLayers()

ogdf::EmbedderMaxFaceLayers::EmbedderMaxFaceLayers ( )
inline

Definition at line 56 of file EmbedderMaxFaceLayers.h.

◆ ~EmbedderMaxFaceLayers()

ogdf::EmbedderMaxFaceLayers::~EmbedderMaxFaceLayers ( )
inline

Definition at line 57 of file EmbedderMaxFaceLayers.h.

Member Function Documentation

◆ computeBlockGraphs()

void ogdf::EmbedderMaxFaceLayers::computeBlockGraphs ( const node &  bT,
const node &  cH 
)
private

Computes recursively the block graph for every block.

Parameters
bTis a block node in the BC-tree.
cHis a node of bT in the block graph.

◆ constraintMaxFace()

int ogdf::EmbedderMaxFaceLayers::constraintMaxFace ( const node &  bT,
const node &  cH 
)
private

Bottom up traversal of BC-tree.

Parameters
bTis the BC-tree node treated in this function call.
cHis the block node which is related to the cut vertex which is parent of bT in BC-tree.

◆ doCall()

virtual void ogdf::EmbedderMaxFaceLayers::doCall ( Graph &  G,
adjEntry &  adjExternal 
)
overridevirtual

Computes an embedding of G with maximum external face.

Parameters
Gis the original graph. Its adjacency list has to be changed by the embedder.
adjExternalis assigned an adjacency entry on the external face and has to be set by the embedder.

Implements ogdf::EmbedderModule.

◆ embedBlock() [1/2]

void ogdf::EmbedderMaxFaceLayers::embedBlock ( const node &  bT)
private

Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT.

Parameters
bTis the tree node treated in this function call.

◆ embedBlock() [2/2]

void ogdf::EmbedderMaxFaceLayers::embedBlock ( const node &  bT,
const node &  cT,
ListIterator< adjEntry > &  after 
)
private

Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT.

Parameters
bTis the tree node treated in this function call.
cTis the parent cut vertex node of bT in the BC-tree. cT is 0 if bT is the root block.
afteris the adjacency entry of the cut vertex, after which bT has to be inserted.

◆ maximumFaceRec()

void ogdf::EmbedderMaxFaceLayers::maximumFaceRec ( const node &  bT,
node &  bT_opt,
int &  ell_opt 
)
private

Top down traversal of BC-tree.

Parameters
bTis the tree node treated in this function call.
bT_optis assigned a block node in BC-tree which contains a face which can be expanded to a maximum face.
ell_optis the size of a maximum face.

Member Data Documentation

◆ blockG

NodeArray<Graph> ogdf::EmbedderMaxFaceLayers::blockG
private

all blocks

Definition at line 122 of file EmbedderMaxFaceLayers.h.

◆ cstrLength

NodeArray< NodeArray<int> > ogdf::EmbedderMaxFaceLayers::cstrLength
private

is saving for each node in the block graphs its cstrLength

Definition at line 140 of file EmbedderMaxFaceLayers.h.

◆ eBlockEmbedding_to_eH

NodeArray< EdgeArray<edge> > ogdf::EmbedderMaxFaceLayers::eBlockEmbedding_to_eH
private

a mapping of edges in blockG to the auxiliaryGraph of the BC-tree

Definition at line 134 of file EmbedderMaxFaceLayers.h.

◆ eH_to_eBlockEmbedding

NodeArray< EdgeArray<edge> > ogdf::EmbedderMaxFaceLayers::eH_to_eBlockEmbedding
private

a mapping of edges in the auxiliaryGraph of the BC-tree to blockG

Definition at line 128 of file EmbedderMaxFaceLayers.h.

◆ nBlockEmbedding_to_nH

NodeArray< NodeArray<node> > ogdf::EmbedderMaxFaceLayers::nBlockEmbedding_to_nH
private

a mapping of nodes in blockG to the auxiliaryGraph of the BC-tree

Definition at line 131 of file EmbedderMaxFaceLayers.h.

◆ newOrder

NodeArray< List<adjEntry> > ogdf::EmbedderMaxFaceLayers::newOrder
private

saves for every node of G the new adjacency list

Definition at line 143 of file EmbedderMaxFaceLayers.h.

◆ nH_to_nBlockEmbedding

NodeArray< NodeArray<node> > ogdf::EmbedderMaxFaceLayers::nH_to_nBlockEmbedding
private

a mapping of nodes in the auxiliaryGraph of the BC-tree to blockG

Definition at line 125 of file EmbedderMaxFaceLayers.h.

◆ nodeLength

NodeArray< NodeArray<int> > ogdf::EmbedderMaxFaceLayers::nodeLength
private

saving for each node in the block graphs its length

Definition at line 137 of file EmbedderMaxFaceLayers.h.

◆ pAdjExternal

adjEntry* ogdf::EmbedderMaxFaceLayers::pAdjExternal
private

an adjacency entry on the external face

Definition at line 119 of file EmbedderMaxFaceLayers.h.

◆ pBCTree

BCTree* ogdf::EmbedderMaxFaceLayers::pBCTree
private

BC-tree of the original graph.

Definition at line 116 of file EmbedderMaxFaceLayers.h.

◆ spqrTrees

NodeArray<StaticSPQRTree*> ogdf::EmbedderMaxFaceLayers::spqrTrees
private

The SPQR-trees of the blocks.

Definition at line 150 of file EmbedderMaxFaceLayers.h.

◆ treeNodeTreated

NodeArray<bool> ogdf::EmbedderMaxFaceLayers::treeNodeTreated
private

treeNodeTreated saves for all block nodes in the BC-tree if it has already been treated or not.

Definition at line 147 of file EmbedderMaxFaceLayers.h.


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