Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

EmbedderMinDepthPiTa.h
Go to the documentation of this file.
1 
32 #pragma once
33 
36 
37 namespace ogdf {
38 
40 
46 public:
47  //constructor
48  EmbedderMinDepthPiTa() : m_useExtendedDepthDefinition(true), pm_blockCutfaceTree(nullptr) { }
49 
50  /* needs to be deleted explicitly for MSVC<=16 and classes containing a NodeArrayP */
52 
53 
59  virtual void doCall(Graph& G, adjEntry& adjExternal) override;
60 
61  bool useExtendedDepthDefinition() const { return m_useExtendedDepthDefinition; }
62 
63  void useExtendedDepthDefinition(bool b) { m_useExtendedDepthDefinition = b; }
64 
65 protected:
66  adjEntry trivialInit(Graph& G) override {
67  planarEmbed(G);
69  adjEntry result = CE.chooseFace()->firstAdj();
70  deleteDummyNodes(G, result);
71 
72  return result;
73  }
74 
75 private:
77 
85  void embedBlocks(const node& bT, const node& cH);
86 
93  void embedCutVertex(const node& vT, bool root = false);
94 
101  void embedBlockVertex(const node& bT, const node& parent_cT);
102 
109  int computeBlockCutfaceTreeEdgeLengths(const node& n);
110 
116  void computeTdiam(const node& n);
117 
126  void invertPath(Graph& G, const node& n, const edge& e);
127 
138  node computeBlockMapping(const node& bDG, const node& parent, List<node>& blocksNodes,
139  List<node>& childBlocks);
140 
148  int eccentricityBottomUp(const node& nT);
149 
156  void eccentricityTopDown(const node& nT);
157 
163  int depthBlock(const node& bT);
164 
170  int depthCutvertex(const node& cT);
171 
179  void deleteDummyNodes(Graph& G, adjEntry& adjExternal);
180 
181 private:
184 
187 
190 
193 
196 
199 
202 
205 
208 
211 
217 
220 
223 
226 
229 
232 
235 
238 
244 
247 
250 
253 
256 
259 
262 
265 
268 
271 
274 
280 
286 
289 
295 
298 
301 
304 
307 
310 };
311 
312 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:46
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::EmbedderMinDepthPiTa::pm_blockCutfaceTree
BCTree * pm_blockCutfaceTree
the block-cutface tree of G (the BC-tree of the dual graph)
Definition: EmbedderMinDepthPiTa.h:255
ogdf::EmbedderMinDepthPiTa
Embedder that minimizes block-nesting depth for given embedded blocks.
Definition: EmbedderMinDepthPiTa.h:45
ogdf::EmbedderMinDepthPiTa::fPG_to_nDG
ArrayBuffer< node > fPG_to_nDG
mapping faces (by ID) in G to nodes in DG
Definition: EmbedderMinDepthPiTa.h:246
ogdf::BCTree
Static BC-trees.
Definition: BCTree.h:55
ogdf::EmbedderMinDepthPiTa::nBlockCutfaceTree_to_nm_blockCutfaceTree
NodeArray< node > nBlockCutfaceTree_to_nm_blockCutfaceTree
mapping of nodes from the graph blockCutfaceTree to the BC-tree m_blockCutfaceTree
Definition: EmbedderMinDepthPiTa.h:258
ogdf::EmbedderMinDepthPiTa::G_nT
NodeArrayP< Graph > G_nT
given a node nT (cutvertex or block), G_nT is the subgraph of G associated with the subtree of the BC...
Definition: EmbedderMinDepthPiTa.h:294
ogdf::EmbedderMinDepthPiTa::eG_nT_to_ePG
NodeArray< EdgeArray< edge > > eG_nT_to_ePG
a mapping of edges in G_nT to edges in G
Definition: EmbedderMinDepthPiTa.h:303
ogdf::EmbedderMinDepthPiTa::Tdiam_initialized
bool Tdiam_initialized
Needed in computeTdiam function to know if first vertex was already inserted.
Definition: EmbedderMinDepthPiTa.h:225
ogdf::EmbedderMinDepthPiTa::edgeLength_blockCutfaceTree
EdgeArray< int > edgeLength_blockCutfaceTree
Saving edge lengths for the block-cutface tree.
Definition: EmbedderMinDepthPiTa.h:219
ogdf::EmbedderMinDepthPiTa::m_useExtendedDepthDefinition
bool m_useExtendedDepthDefinition
Definition: EmbedderMinDepthPiTa.h:76
ogdf::EmbedderMinDepthPiTa::eH_to_eBlockEmbedding
NodeArray< EdgeArray< edge > > eH_to_eBlockEmbedding
a mapping of edges in the auxiliaryGraph of the BC-tree to blockG
Definition: EmbedderMinDepthPiTa.h:198
ogdf::EmbedderMinDepthPiTa::eccentricity
NodeArray< int > eccentricity
saving eccentricity for every node of the block-cutface tree
Definition: EmbedderMinDepthPiTa.h:273
ogdf::embedder::EmbedderBCTreeBase
Common base for embedder algorithms based on BC trees.
Definition: EmbedderBCTreeBase.h:44
ogdf::EmbedderMinDepthPiTa::nBlockEmbedding_to_nH
NodeArray< NodeArray< node > > nBlockEmbedding_to_nH
a mapping of nodes in blockG to the auxiliaryGraph of the BC-tree
Definition: EmbedderMinDepthPiTa.h:201
ogdf::EmbedderMinDepthPiTa::tmpAdjExtFace
adjEntry tmpAdjExtFace
adjacency entry of the external face of the embedding of G
Definition: EmbedderMinDepthPiTa.h:237
ogdf::EmbedderMinDepthPiTa::bcTreePG
Graph bcTreePG
the tree of pBCTree rooted at a cutface.
Definition: EmbedderMinDepthPiTa.h:183
ogdf::EmbedderMinDepthPiTa::nodeLength
NodeArray< NodeArray< int > > nodeLength
saving for each node in the block graphs its length
Definition: EmbedderMinDepthPiTa.h:207
ogdf::EmbedderMinDepthPiTa::M_B
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,...
Definition: EmbedderMinDepthPiTa.h:216
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::FaceElement::firstAdj
adjEntry firstAdj() const
Returns the first adjacency element in the face.
Definition: CombinatorialEmbedding.h:139
ogdf::EmbedderMinDepthPiTa::Tdiam
Graph Tdiam
The diametrical tree of the block-cutface tree.
Definition: EmbedderMinDepthPiTa.h:222
ogdf::EmbedderMinDepthPiTa::nBlockCutfaceTree_to_nTdiam
NodeArray< node > nBlockCutfaceTree_to_nTdiam
Mapping nodes from block-cutvertex tree to the diametrical tree.
Definition: EmbedderMinDepthPiTa.h:228
ogdf::EmbedderMinDepthPiTa::Gamma_adjExt_nT
NodeArray< adjEntry > Gamma_adjExt_nT
adjacency entry of the external face of G_nT[nT]
Definition: EmbedderMinDepthPiTa.h:309
ogdf::EmbedderMinDepthPiTa::nG_nT_to_nPG
NodeArray< NodeArray< node > > nG_nT_to_nPG
a mapping of nodes in G_nT to nodes in G
Definition: EmbedderMinDepthPiTa.h:297
ogdf::EmbedderMinDepthPiTa::eBlockEmbedding_to_eH
NodeArray< EdgeArray< edge > > eBlockEmbedding_to_eH
a mapping of edges in blockG to the auxiliaryGraph of the BC-tree
Definition: EmbedderMinDepthPiTa.h:204
ogdf::EmbedderMinDepthPiTa::bDG_to_bPG
NodeArray< node > bDG_to_bPG
a mapping of blocks of the dual graph DG to its original graph G
Definition: EmbedderMinDepthPiTa.h:267
ogdf::EmbedderMinDepthPiTa::nTdiam_to_nBlockCutfaceTree
NodeArray< node > nTdiam_to_nBlockCutfaceTree
Mapping nodes from the diametrical tree to block-cutvertex tree.
Definition: EmbedderMinDepthPiTa.h:231
OGDF_NO_COPY
#define OGDF_NO_COPY(cls)
Explicitly disables (deletes) copy construction and assignment for class cls.
Definition: copy_move.h:37
ogdf::planarEmbed
bool planarEmbed(Graph &G)
Returns true, if G is planar, false otherwise. If true is returned, G will be planarly embedded.
Definition: extended_graph_alg.h:308
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::EmbedderMinDepthPiTa::useExtendedDepthDefinition
bool useExtendedDepthDefinition() const
Definition: EmbedderMinDepthPiTa.h:61
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::ConstCombinatorialEmbedding::chooseFace
face chooseFace(std::function< bool(face)> includeFace=[](face) { return true;}, bool isFastTest=true) const
Returns a random face.
ogdf::EmbedderMinDepthPiTa::dummyNodes
List< node > dummyNodes
this list is saving the dummy nodes which were inserted to produce a face in one-edge-blocks
Definition: EmbedderMinDepthPiTa.h:285
ogdf::EmbedderMinDepthPiTa::m_cB
EdgeArray< int > m_cB
an array saving the length for each edge in the BC-tree
Definition: EmbedderMinDepthPiTa.h:210
ogdf::EmbedderMinDepthPiTa::nPG_to_nG_nT
NodeArray< NodeArray< node > > nPG_to_nG_nT
a mapping of nodes in G to nodes in G_nT
Definition: EmbedderMinDepthPiTa.h:300
ogdf::EmbedderMinDepthPiTa::nm_blockCutfaceTree_to_nBlockCutfaceTree
NodeArray< node > nm_blockCutfaceTree_to_nBlockCutfaceTree
mapping of nodes from the BC-tree m_blockCutfaceTree to the graph blockCutfaceTree
Definition: EmbedderMinDepthPiTa.h:261
EmbedderBCTreeBase.h
Definition of ogdf::EmbedderBCTreeBase.
EmbedderMaxFaceBiconnectedGraphs.h
Declares ogdf::EmbedderMaxFaceBiconnectedGraphs.
ogdf::EmbedderMinDepthPiTa::ePG_to_eG_nT
NodeArray< EdgeArray< edge > > ePG_to_eG_nT
a mapping of edges in G to edges in G_nT
Definition: EmbedderMinDepthPiTa.h:306
ogdf::EmbedderMinDepthPiTa::nDG_to_fPG
NodeArray< int > nDG_to_fPG
mapping nodes in DG to faces in DG
Definition: EmbedderMinDepthPiTa.h:249
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::EmbedderMinDepthPiTa::npBCTree_to_nBCTree
NodeArray< node > npBCTree_to_nBCTree
a mapping of nodes in pBCTree->bcTree() to nodes in bcTreePG
Definition: EmbedderMinDepthPiTa.h:189
ogdf::CombinatorialEmbedding
Combinatorial embeddings of planar graphs with modification functionality.
Definition: CombinatorialEmbedding.h:397
ogdf::EmbedderMinDepthPiTa::useExtendedDepthDefinition
void useExtendedDepthDefinition(bool b)
Definition: EmbedderMinDepthPiTa.h:63
ogdf::EmbedderMinDepthPiTa::nH_to_nBlockEmbedding
NodeArray< NodeArray< node > > nH_to_nBlockEmbedding
a mapping of nodes in the auxiliaryGraph of the BC-tree to blockG
Definition: EmbedderMinDepthPiTa.h:195
ogdf::EmbedderMinDepthPiTa::knotTdiam
node knotTdiam
The knot of the diametrical tree.
Definition: EmbedderMinDepthPiTa.h:234
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::EmbedderMinDepthPiTa::EmbedderMinDepthPiTa
EmbedderMinDepthPiTa()
Definition: EmbedderMinDepthPiTa.h:48
ogdf::EmbedderMinDepthPiTa::nBCTree_to_npBCTree
NodeArray< node > nBCTree_to_npBCTree
a mapping of nodes in bcTreePG to nodes in pBCTree->bcTree()
Definition: EmbedderMinDepthPiTa.h:186
ogdf::EmbedderMinDepthPiTa::newOrder
NodeArray< List< adjEntry > > newOrder
saves for every node of G the new adjacency list
Definition: EmbedderMinDepthPiTa.h:288
ogdf::EmbedderMinDepthPiTa::blockCutfaceTree
Graph blockCutfaceTree
the block-cutface tree of G (only the graph, rooted at the external face
Definition: EmbedderMinDepthPiTa.h:252
ogdf::EmbedderMinDepthPiTa::bPG_to_bDG
NodeArray< node > bPG_to_bDG
a mapping of blocks of the graph G to its dual graph DG
Definition: EmbedderMinDepthPiTa.h:264
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::EmbedderMinDepthPiTa::oneEdgeBlockNodes
List< node > oneEdgeBlockNodes
list of nodes which are only in one block which exists of extactly this node plus a cutvertex
Definition: EmbedderMinDepthPiTa.h:279
ogdf::EmbedderMinDepthPiTa::trivialInit
adjEntry trivialInit(Graph &G) override
Initialization code for biconnected input. Returns an adjacency entry that lies on the external face.
Definition: EmbedderMinDepthPiTa.h:66
ogdf::EmbedderMinDepthPiTa::blockG
NodeArrayP< Graph > blockG
all blocks
Definition: EmbedderMinDepthPiTa.h:192
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::EmbedderMinDepthPiTa::eccentricity_alt
NodeArray< int > eccentricity_alt
saving second highest eccentricity for every node of the block-cutface tree
Definition: EmbedderMinDepthPiTa.h:270
ogdf::EmbedderMinDepthPiTa::faces
List< List< adjEntry > > faces
a list of all faces in G, a face in this list is containing a list of all adjacency entries
Definition: EmbedderMinDepthPiTa.h:243