Open
Graph Drawing
Framework

 v.2012.07
 

PertinentGraph.h
Go to the documentation of this file.
1 /*
2  * $Revision: 2523 $
3  *
4  * last checkin:
5  * $Author: gutwenger $
6  * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7  ***************************************************************/
8 
44 #ifdef _MSC_VER
45 #pragma once
46 #endif
47 
48 
49 #ifndef OGDF_PERTINENT_GRAPH_H
50 #define OGDF_PERTINENT_GRAPH_H
51 
52 
53 namespace ogdf {
54 
55  class OGDF_EXPORT SPQRTree;
56 
57 
58 //---------------------------------------------------------
59 // PertinentGraph
60 // pertinent graph of a node in an SPQR-tree
61 //---------------------------------------------------------
63 
81 {
82  friend class OGDF_EXPORT SPQRTree;
83 
84 public:
85 
86  // constructor
87  // Remark: Pertinent graphs are created by the pertinentGraph()
88  // function of SPQRTree.
89 
91 
95  PertinentGraph() : m_vT(0) { }
96 
98  void init(node vT) {
99  m_P = Graph();
100  m_vT = vT;
101  m_vEdge = m_skRefEdge = 0;
102  m_origV.init(m_P,0);
103  m_origE.init(m_P,0);
104  }
105 
106 
108  node treeNode() const {
109  return m_vT;
110  }
111 
113  const Graph &getGraph() const {
114  return m_P;
115  }
116 
119  return m_P;
120  }
121 
123 
126  edge referenceEdge() const {
127  return m_vEdge;
128  }
129 
131 
136  return m_skRefEdge;
137  }
138 
140 
143  node original(node v) const {
144  return m_origV[v];
145  }
146 
148 
152  edge original(edge e) const {
153  return m_origE[e];
154  }
155 
156 protected:
161 
164 };
165 
166 
167 
168 } // end namespace ogdf
169 
170 
171 #endif