Open
Graph Drawing
Framework

 v.2012.05
 

DynamicBCTree.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046 
00047 #ifndef OGDF_DYNAMIC_BC_TREE_H
00048 #define OGDF_DYNAMIC_BC_TREE_H
00049 
00050 #include <ogdf/decomposition/BCTree.h>
00051 
00052 namespace ogdf {
00053 
00068 class OGDF_EXPORT DynamicBCTree : public BCTree {
00069 
00070 friend class PlanarAugmentation;
00071 friend class PlanarAugmentationFix;
00072 
00073 protected:
00074 
00086     mutable NodeArray<node> m_bNode_owner;
00099     NodeArray<int> m_bNode_degree;
00100 
00104     void init ();
00105 
00117     node unite (node uB, node vB, node wB);
00124     node find (node vB) const;
00125 
00133     node parent (node vB) const;
00144     node condensePath (node sG, node tG);
00145 
00146 public:
00147 
00156     DynamicBCTree (Graph& G, bool callInitConnected = false) : BCTree(G, callInitConnected) { init(); }
00165     DynamicBCTree (Graph& G, node vG, bool callInitConnected = false) : BCTree(G,vG, callInitConnected) { init(); }
00166 
00182     node bcproper (node vG) const;
00193     node bcproper (edge eG) const;
00194 
00211     node repVertex (node uG, node vB) const { return BCTree::repVertex(uG,find(vB)); }
00244     node cutVertex (node uB, node vB) const { return BCTree::cutVertex(find(uB),find(vB)); }
00245 
00262     virtual edge updateInsertedEdge (edge eG);
00280     virtual node updateInsertedNode (edge eG, edge fG);
00281 
00291     edge insertEdge (node sG, node tG) { return updateInsertedEdge(m_G.newEdge(sG,tG)); }
00300     node insertNode (edge eG) { return updateInsertedNode(eG,m_G.split(eG)); }
00301 
00316 node bComponent (node uG, node vG) const;
00317 
00320 };
00321 
00322 }
00323 
00324 #endif