Embedder that minimizes block-nesting depth. More...
#include <ogdf/planarity/EmbedderMinDepth.h>
Public Member Functions | |
EmbedderMinDepth ()=default | |
EmbedderMinDepth (const EmbedderMinDepth ©)=delete | |
virtual void | doCall (Graph &G, adjEntry &adjExternal) override |
Computes an embedding of G with minimum depth. More... | |
EmbedderMinDepth & | operator= (const EmbedderMinDepth ©)=delete |
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 (bool t) | |
timeout is turned off (false) or on (true) (with 0 second) More... | |
Timeouter (const Timeouter &t) | |
Timeouter (double t) | |
timeout is set to the given value (seconds) More... | |
~Timeouter () | |
bool | isTimeLimit () const |
returns whether any time limit is set or not More... | |
Timeouter & | operator= (const Timeouter &t) |
double | timeLimit () const |
returns the current time limit for the call More... | |
void | timeLimit (bool t) |
shorthand to turn timelimit off or on (with 0 seconds) More... | |
void | timeLimit (double t) |
sets the time limit for the call (in seconds); <0 means no limit. More... | |
Private Member Functions | |
int | 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 | computeBlockGraphs (const node &bT, const node &cH) |
Computes recursively the block graph for every block. 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 | topDownTraversal (const node &bT) |
Top-down-traversal of BC-tree. More... | |
Private Attributes | |
NodeArrayP< Graph > | blockG |
all blocks 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< List< node > > | 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 > > | 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 > | m_cB |
an array saving the length for each edge in the BC-tree More... | |
NodeArray< int > | minDepth |
an array containing the minimum depth of each block 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... | |
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 Member Functions inherited from ogdf::embedder::EmbedderBCTreeBase< false, true > | |
node | initBCTree (Graph &G) |
Initializes pBCTree and returns the root node of this tree or nullptr if G is biconnected. More... | |
virtual adjEntry | trivialInit (Graph &G) |
Initialization code for biconnected input. Returns an adjacency entry that lies on the external face. More... | |
Protected Attributes inherited from ogdf::embedder::EmbedderBCTreeBase< false, true > | |
adjEntry * | pAdjExternal |
an adjacency entry on the external face More... | |
BCTree * | pBCTree |
BC-tree of the original graph. More... | |
Protected Attributes inherited from ogdf::Timeouter | |
double | m_timeLimit |
Time limit for module calls (< 0 means no limit). More... | |
Embedder that minimizes block-nesting depth.
See paper "Graph Embedding with Minimum Depth and Maximum External Face" by C. Gutwenger and P. Mutzel (2004) for details.
Definition at line 50 of file EmbedderMinDepth.h.
|
default |
|
delete |
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.
bT | is a block vertex in the BC-tree. |
cH | is a vertex in the original graph G. |
bT
with cH
on the external face. Computes recursively the block graph for every block.
bT | is a block node in the BC-tree. |
cH | is a node of bT in the block graph. |
Computes an embedding of G
with minimum depth.
G | is the original graph. |
adjExternal | is assigned an adjacency entry in the external face. |
Implements ogdf::EmbedderModule.
|
private |
Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT.
bT | is the tree node treated in this function call. |
|
private |
Computes the adjacency list for all nodes in a block and calls recursively the function for all blocks incident to nodes in bT.
bT | is the tree node treated in this function call. |
cT | is the parent cut vertex node of bT in the BC-tree. cT is 0 if bT is the root block. |
after | is the adjacency entry of the cut vertex, after which bT has to be inserted. |
|
delete |
|
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}.
bT | is a block vertex in the BC-tree. |
|
private |
all blocks
Definition at line 121 of file EmbedderMinDepth.h.
a mapping of edges in blockG to the auxiliaryGraph of the BC-tree
Definition at line 133 of file EmbedderMinDepth.h.
a mapping of edges in the auxiliaryGraph of the BC-tree to blockG
Definition at line 127 of file EmbedderMinDepth.h.
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 155 of file EmbedderMinDepth.h.
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 148 of file EmbedderMinDepth.h.
|
private |
an array saving the length for each edge in the BC-tree
Definition at line 142 of file EmbedderMinDepth.h.
|
private |
an array containing the minimum depth of each block
Definition at line 139 of file EmbedderMinDepth.h.
a mapping of nodes in blockG to the auxiliaryGraph of the BC-tree
Definition at line 130 of file EmbedderMinDepth.h.
saves for every node of G the new adjacency list
Definition at line 158 of file EmbedderMinDepth.h.
a mapping of nodes in the auxiliaryGraph of the BC-tree to blockG
Definition at line 124 of file EmbedderMinDepth.h.
saving for each node in the block graphs its length
Definition at line 136 of file EmbedderMinDepth.h.
|
private |
The SPQR-trees of the blocks.
Definition at line 165 of file EmbedderMinDepth.h.
|
private |
treeNodeTreated saves for all block nodes in the BC-tree if it has already been treated or not.
Definition at line 162 of file EmbedderMinDepth.h.