Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::EmbedderMinDepthMaxFaceLayers Class Reference

Planar graph embedding with minimum block-nesting depth and maximum external face (plus layers approach). More...

#include <ogdf/planarity/EmbedderMinDepthMaxFaceLayers.h>

+ Inheritance diagram for ogdf::EmbedderMinDepthMaxFaceLayers:

Public Member Functions

 EmbedderMinDepthMaxFaceLayers ()
 
virtual void doCall (Graph &G, adjEntry &adjExternal) override
 Call embedder algorithm. 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 Types

using MDMFLengthAttribute = embedder::MDMFLengthAttribute
 

Private Member Functions

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...
 
int md_bottomUpTraversal (const node &bT, const node &cH)
 Bottom-up-traversal of bcTree computing the values m_{cT, bT} for all edges (cT, bT) in the BC-tree. More...
 
void md_topDownTraversal (const node &bT)
 Top-down-traversal of BC-tree. More...
 
int mf_constraintMaxFace (const node &bT, const node &cH)
 Bottom up traversal of BC-tree. More...
 
void mf_maximumFaceRec (const node &bT, node &bT_opt, int &ell_opt)
 Top down traversal of BC-tree. More...
 

Private Attributes

NodeArray< List< node > > md_M2
 M2 is empty, if |M_B| != 1, otherwise M_B = {cH} M2 = {cH' in V_B \ {v} | m_B(cH') = m2} with m2 = max{m_B(vH) : vH in V_B, vH != cH}. More...
 
NodeArray< List< node > > md_M_B
 M_B = {cH in B | m_B(cH) = m_B} with m_B = max{m_B(c) : c in B} and m_B(c) = max( {0} cup {m_{c, B'} | c in B', B' != B} ). More...
 
EdgeArray< int > md_m_cB
 an array saving the length for each edge in the BC-tree More...
 
NodeArray< int > md_minDepth
 an array containing the minimum depth of each block More...
 
NodeArray< int > md_nodeLength
 saving for each node in the block graph its length More...
 
EdgeArray< MDMFLengthAttribute > mdmf_edgeLength
 is saving for each edge of the block graph its length More...
 
NodeArray< MDMFLengthAttribute > mdmf_nodeLength
 is saving for each node of the block graph its length More...
 
NodeArray< int > mf_cstrLength
 is saving for each node of the block graph its cstrLength More...
 
NodeArray< int > mf_maxFaceSize
 an array containing the maximum face size of each block More...
 
NodeArray< int > mf_nodeLength
 is saving for each node of the block graph its length More...
 
NodeArray< List< adjEntry > > newOrder
 saves for every node of G the new adjacency list More...
 
adjEntry * pAdjExternal
 an adjacency entry on the external face More...
 
BCTree * pBCTree
 the BC-tree of G 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 minimum block-nesting depth and maximum external face (plus layers approach).

See paper "Graph Embedding with Minimum Depth and Maximum External Face" by C. Gutwenger and P. Mutzel (2004) for details. The algorithm for minimum depth and 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 53 of file EmbedderMinDepthMaxFaceLayers.h.

Member Typedef Documentation

◆ MDMFLengthAttribute

Constructor & Destructor Documentation

◆ EmbedderMinDepthMaxFaceLayers()

ogdf::EmbedderMinDepthMaxFaceLayers::EmbedderMinDepthMaxFaceLayers ( )
inline

Definition at line 57 of file EmbedderMinDepthMaxFaceLayers.h.

Member Function Documentation

◆ doCall()

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

Call embedder algorithm.

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

Implements ogdf::EmbedderModule.

◆ embedBlock() [1/2]

void ogdf::EmbedderMinDepthMaxFaceLayers::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::EmbedderMinDepthMaxFaceLayers::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.

◆ md_bottomUpTraversal()

int ogdf::EmbedderMinDepthMaxFaceLayers::md_bottomUpTraversal ( const node &  bT,
const node &  cH 
)
private

Bottom-up-traversal of bcTree computing the values m_{cT, bT} for all edges (cT, bT) in the BC-tree.

The length of each vertex v != c in bT is set to 1 if v in M_{bT} and to 0 otherwise.

Parameters
bTis a block vertex in the BC-tree.
cHis a vertex in the original graph G.
Returns
Minimum depth of an embedding of bT with cH on the external face.

◆ md_topDownTraversal()

void ogdf::EmbedderMinDepthMaxFaceLayers::md_topDownTraversal ( const node &  bT)
private

Top-down-traversal of BC-tree.

The minimum depth of the BC-tree-node bT is calculated and before calling the function recursively for all children of bT in the BC-tree, the nodeLength of the cut-vertex which bT and the child have in common is computed. The length of each node is set to 1 if it is in M_B and 0 otherwise, except for |M_B| = 1, than it is set to 1 if it is in M2 with m2 = max{m_B(v) : v in V_B, v != c} and M2 = {c in V_B \ {v} | m_B(c) = m2}.

Parameters
bTis a block vertex in the BC-tree.

◆ mf_constraintMaxFace()

int ogdf::EmbedderMinDepthMaxFaceLayers::mf_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.

◆ mf_maximumFaceRec()

void ogdf::EmbedderMinDepthMaxFaceLayers::mf_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 that can be expanded to a maximum face.
ell_optis the size of a maximum face.

Member Data Documentation

◆ md_M2

NodeArray< List<node> > ogdf::EmbedderMinDepthMaxFaceLayers::md_M2
private

M2 is empty, if |M_B| != 1, otherwise M_B = {cH} M2 = {cH' in V_B \ {v} | m_B(cH') = m2} with m2 = max{m_B(vH) : vH in V_B, vH != cH}.

Definition at line 156 of file EmbedderMinDepthMaxFaceLayers.h.

◆ md_M_B

NodeArray< List<node> > ogdf::EmbedderMinDepthMaxFaceLayers::md_M_B
private

M_B = {cH in B | m_B(cH) = m_B} with m_B = max{m_B(c) : c in B} and m_B(c) = max( {0} cup {m_{c, B'} | c in B', B' != B} ).

Definition at line 151 of file EmbedderMinDepthMaxFaceLayers.h.

◆ md_m_cB

EdgeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::md_m_cB
private

an array saving the length for each edge in the BC-tree

Definition at line 147 of file EmbedderMinDepthMaxFaceLayers.h.

◆ md_minDepth

NodeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::md_minDepth
private

an array containing the minimum depth of each block

Definition at line 144 of file EmbedderMinDepthMaxFaceLayers.h.

◆ md_nodeLength

NodeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::md_nodeLength
private

saving for each node in the block graph its length

Definition at line 141 of file EmbedderMinDepthMaxFaceLayers.h.

◆ mdmf_edgeLength

EdgeArray<MDMFLengthAttribute> ogdf::EmbedderMinDepthMaxFaceLayers::mdmf_edgeLength
private

is saving for each edge of the block graph its length

Definition at line 171 of file EmbedderMinDepthMaxFaceLayers.h.

◆ mdmf_nodeLength

NodeArray<MDMFLengthAttribute> ogdf::EmbedderMinDepthMaxFaceLayers::mdmf_nodeLength
private

is saving for each node of the block graph its length

Definition at line 168 of file EmbedderMinDepthMaxFaceLayers.h.

◆ mf_cstrLength

NodeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::mf_cstrLength
private

is saving for each node of the block graph its cstrLength

Definition at line 162 of file EmbedderMinDepthMaxFaceLayers.h.

◆ mf_maxFaceSize

NodeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::mf_maxFaceSize
private

an array containing the maximum face size of each block

Definition at line 165 of file EmbedderMinDepthMaxFaceLayers.h.

◆ mf_nodeLength

NodeArray<int> ogdf::EmbedderMinDepthMaxFaceLayers::mf_nodeLength
private

is saving for each node of the block graph its length

Definition at line 159 of file EmbedderMinDepthMaxFaceLayers.h.

◆ newOrder

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

saves for every node of G the new adjacency list

Definition at line 174 of file EmbedderMinDepthMaxFaceLayers.h.

◆ pAdjExternal

adjEntry* ogdf::EmbedderMinDepthMaxFaceLayers::pAdjExternal
private

an adjacency entry on the external face

Definition at line 138 of file EmbedderMinDepthMaxFaceLayers.h.

◆ pBCTree

BCTree* ogdf::EmbedderMinDepthMaxFaceLayers::pBCTree
private

the BC-tree of G

Definition at line 135 of file EmbedderMinDepthMaxFaceLayers.h.

◆ treeNodeTreated

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

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

Definition at line 178 of file EmbedderMinDepthMaxFaceLayers.h.


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