Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

EmbedderMinDepthPiTa.h
Go to the documentation of this file.
1 
32 #pragma once
33 
36 
37 
38 namespace ogdf {
39 
41 
47 {
48 public:
49  //constructor
51  : m_useExtendedDepthDefinition(true), pm_blockCutfaceTree(nullptr) {}
52 
59  virtual void doCall(Graph& G, adjEntry& adjExternal) override;
60 
61  bool useExtendedDepthDefinition() const { return m_useExtendedDepthDefinition; }
62  void useExtendedDepthDefinition(bool b) { m_useExtendedDepthDefinition = b; }
63 
64 protected:
65  adjEntry trivialInit(Graph &G) override {
66  planarEmbed(G);
68  adjEntry result = CE.chooseFace()->firstAdj();
69  deleteDummyNodes(G, result);
70 
71  return result;
72  }
73 
74 private:
76 
84  void embedBlocks(const node& bT, const node& cH);
85 
92  void embedCutVertex(const node& vT, bool root = false);
93 
100  void embedBlockVertex(const node& bT, const node& parent_cT);
101 
108  int computeBlockCutfaceTreeEdgeLengths(const node& n);
109 
115  void computeTdiam(const node& n);
116 
125  void invertPath(Graph& G, const node& n, const edge& e);
126 
137  node computeBlockMapping(
138  const node& bDG,
139  const node& parent,
140  List<node>& blocksNodes,
141  List<node>& childBlocks);
142 
150  int eccentricityBottomUp(const node& nT);
151 
158  void eccentricityTopDown(const node& nT);
159 
165  int depthBlock(const node& bT);
166 
172  int depthCutvertex(const node& cT);
173 
181  void deleteDummyNodes(Graph& G, adjEntry& adjExternal);
182 
183 private:
186 
189 
192 
195 
198 
201 
204 
207 
210 
213 
219 
222 
225 
228 
231 
234 
237 
240 
246 
249 
252 
255 
258 
261 
264 
267 
270 
273 
276 
282 
288 
291 
297 
300 
303 
306 
309 
312 };
313 
314 }
NodeArray< node > npBCTree_to_nBCTree
a mapping of nodes in pBCTree->bcTree() to nodes in bcTreePG
NodeArray< int > eccentricity
saving eccentricity for every node of the block-cutface tree
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
NodeArray< NodeArray< node > > nH_to_nBlockEmbedding
a mapping of nodes in the auxiliaryGraph of the BC-tree to blockG
adjEntry firstAdj() const
Returns the first adjacency element in the face.
NodeArray< node > nTdiam_to_nBlockCutfaceTree
Mapping nodes from the diametrical tree to block-cutvertex tree.
EdgeArray< int > edgeLength_blockCutfaceTree
Saving edge lengths for the block-cutface tree.
face chooseFace(std::function< bool(face)> includeFace=[](face) { return true;}, bool isFastTest=true) const
Returns a random face.
NodeArray< node > bDG_to_bPG
a mapping of blocks of the dual graph DG to its original graph G
An array that keeps track of the number of inserted elements; also usable as an efficient stack...
Definition: Array.h:45
node knotTdiam
The knot of the diametrical tree.
NodeArray< EdgeArray< edge > > eG_nT_to_ePG
a mapping of edges in G_nT to edges in G
List< node > oneEdgeBlockNodes
list of nodes which are only in one block which exists of extactly this node plus a cutvertex ...
NodeArray< EdgeArray< edge > > eH_to_eBlockEmbedding
a mapping of edges in the auxiliaryGraph of the BC-tree to blockG
List< List< adjEntry > > faces
a list of all faces in G, a face in this list is containing a list of all adjacency entries ...
NodeArray< NodeArray< node > > nBlockEmbedding_to_nH
a mapping of nodes in blockG to the auxiliaryGraph of the BC-tree
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
NodeArray< int > nDG_to_fPG
mapping nodes in DG to faces in DG
bool planarEmbed(Graph &G)
Returns true, if G is planar, false otherwise. If true is returned, G will be planarly embedded...
BCTree * pm_blockCutfaceTree
the block-cutface tree of G (the BC-tree of the dual graph)
NodeArray< int > eccentricity_alt
saving second highest eccentricity for every node of the block-cutface tree
NodeArray< adjEntry > Gamma_adjExt_nT
adjacency entry of the external face of G_nT[nT]
NodeArray< node > nm_blockCutfaceTree_to_nBlockCutfaceTree
mapping of nodes from the BC-tree m_blockCutfaceTree to the graph blockCutfaceTree ...
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
List< node > dummyNodes
this list is saving the dummy nodes which were inserted to produce a face in one-edge-blocks ...
Static BC-trees.
Definition: BCTree.h:55
NodeArray< Graph > blockG
all blocks
Class for the representation of edges.
Definition: Graph_d.h:292
NodeArray< EdgeArray< edge > > eBlockEmbedding_to_eH
a mapping of edges in blockG to the auxiliaryGraph of the BC-tree
NodeArray< List< adjEntry > > newOrder
saves for every node of G the new adjacency list
NodeArray< node > nBlockCutfaceTree_to_nm_blockCutfaceTree
mapping of nodes from the graph blockCutfaceTree to the BC-tree m_blockCutfaceTree ...
Class for the representation of nodes.
Definition: Graph_d.h:169
EdgeArray< int > m_cB
an array saving the length for each edge in the BC-tree
adjEntry trivialInit(Graph &G) override
Initialization code for biconnected input. Returns an adjacency entry that lies on the external face...
NodeArray< Graph > G_nT
given a node nT (cutvertex or block), G_nT is the subgraph of G associated with the subtree of the BC...
Graph blockCutfaceTree
the block-cutface tree of G (only the graph, rooted at the external face
NodeArray< node > bPG_to_bDG
a mapping of blocks of the graph G to its dual graph DG
NodeArray< NodeArray< node > > nG_nT_to_nPG
a mapping of nodes in G_nT to nodes in G
bool Tdiam_initialized
Needed in computeTdiam function to know if first vertex was already inserted.
Declares ogdf::EmbedderMaxFaceBiconnectedGraphs.
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...
NodeArray< node > nBlockCutfaceTree_to_nTdiam
Mapping nodes from block-cutvertex tree to the diametrical tree.
NodeArray< NodeArray< node > > nPG_to_nG_nT
a mapping of nodes in G to nodes in G_nT
NodeArray< NodeArray< int > > nodeLength
saving for each node in the block graphs its length
Embedder that minimizes block-nesting depth for given embedded blocks.
adjEntry tmpAdjExtFace
adjacency entry of the external face of the embedding of G
ArrayBuffer< node > fPG_to_nDG
mapping faces (by ID) in G to nodes in DG
Common base for embedder algorithms based on BC trees.
The namespace for all OGDF objects.
Graph Tdiam
The diametrical tree of the block-cutface tree.
Definition of ogdf::EmbedderBCTreeBase.
Combinatorial embeddings of planar graphs with modification functionality.
NodeArray< EdgeArray< edge > > ePG_to_eG_nT
a mapping of edges in G to edges in G_nT
NodeArray< node > nBCTree_to_npBCTree
a mapping of nodes in bcTreePG to nodes in pBCTree->bcTree()
Class for adjacency list elements.
Definition: Graph_d.h:79
Graph bcTreePG
the tree of pBCTree rooted at a cutface.