Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

DynamicSPQRForest.h
Go to the documentation of this file.
1 
32 #pragma once
33 
36 
37 namespace ogdf {
38 
50 public:
52  enum class TNodeType {
53  SComp = static_cast<int>(SPQRTree::NodeType::SNode),
54  PComp = static_cast<int>(SPQRTree::NodeType::PNode),
55  RComp = static_cast<int>(SPQRTree::NodeType::RNode)
56  };
57 
58 protected:
60  mutable Graph m_T;
61 
70 
80 
90 
101 
105 
108 
111 
115 
119 
122 
126 
130 
134 
136  void init ();
137 
153  void createSPQR (node vB) const;
154 
168  node uniteSPQR (node vB, node sT, node tT);
169 
177  node findSPQR (node vT) const;
179 
191  node findNCASPQR (node sT, node tT) const;
192 
206  SList<node>& findPathSPQR (node sH, node tH, node& rT) const;
208 
222  edge updateInsertedEdgeSPQR (node vB, edge eG);
223 
237  node updateInsertedNodeSPQR (node vB, edge eG, edge fG);
239 
240 public:
250  explicit DynamicSPQRForest (Graph& G) : DynamicBCTree(G) { init(); }
251 
267  node spqrproper (edge eH) const { return m_hEdge_tNode[eH] = findSPQR(m_hEdge_tNode[eH]); }
268 
276  edge twinEdge (edge eH) const { return m_hEdge_twinEdge[eH]; }
278 
289  TNodeType typeOfTNode (node vT) const { return m_tNode_type[vT]; }
290 
302  const List<edge>& hEdgesSPQR (node vT) const { return m_tNode_hEdges[vT]; }
303 
316  SList<node>& findPathSPQR (node sH, node tH) const;
317 
333  edge virtualEdge (node vT, node wT) const;
335 
349  edge updateInsertedEdge (edge eG) override;
350 
365  node updateInsertedNode (edge eG, edge fG) override;
366 
368 };
369 
370 }
NodeArray< TNodeType > m_tNode_type
The types of the SPQR-tree-vertices.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Dynamic BC-trees.
Definition: DynamicBCTree.h:54
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
NodeArray< node > m_tNode_owner
The owners of the SPQR-tree-vertices in the UNION/FIND structure.
Singly linked lists (maintaining the length of the list).
Definition: SList.h:777
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:423
Dynamic SPQR-forest.
EdgeArray< node > m_hEdge_tNode
The SPQR-tree-vertices which the real and virtual edges are belonging to.
Class for the representation of edges.
Definition: Graph_d.h:291
node spqrproper(edge eH) const
DynamicSPQRForest(Graph &G)
A constructor.
Class for the representation of nodes.
Definition: Graph_d.h:167
Declaration of class SPQRTree.
NodeArray< int > m_bNode_numR
The numbers of R-components.
NodeArray< node > m_htogc
Auxiliary array used by createSPQR().
TNodeType typeOfTNode(node vT) const
NodeArray< int > m_bNode_numP
The numbers of P-components.
NodeArray< bool > m_tNode_isMarked
Auxiliary array used by findNCASPQR()
Declaration of class DynamicBCTree.
edge twinEdge(edge eH) const
Returns the twin edge of a given edge of m_H, if it is virtual, or nullptr, if it is real...
NodeArray< List< edge > > m_tNode_hEdges
Lists of real and virtual edges belonging to SPQR-tree vertices.
NodeArray< int > m_bNode_numS
The numbers of S-components.
NodeArray< node > m_bNode_SPQR
The namespace for all OGDF objects.
EdgeArray< ListIterator< edge > > m_hEdge_position
The positions of real and virtual edges in their m_tNode_hEdges lists.
EdgeArray< edge > m_hEdge_twinEdge
The partners of virtual edges (nullptr if real).
Graph m_T
A Graph structure containing all SPQR-trees.
const List< edge > & hEdgesSPQR(node vT) const
Returns a linear list of the edges in m_H belonging to the triconnected component represented by a gi...
NodeArray< edge > m_tNode_hRefEdge
The virtual edges leading to the parents of the SPQR-tree vertices.
TNodeType
Enumeration type for characterizing the SPQR-tree-vertices.