Open
Graph Drawing
Framework

 v.2012.05
 

PlanarAugmentationFix.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_PLANAR_AUGMENTATION_FIX_H
00048 #define OGDF_PLANAR_AUGMENTATION_FIX_H
00049 
00050 #include <ogdf/module/AugmentationModule.h>
00051 #include <ogdf/basic/List.h>
00052 #include <ogdf/decomposition/DynamicBCTree.h>
00053 #include <ogdf/basic/CombinatorialEmbedding.h>
00054 #include <ogdf/basic/FaceArray.h>
00055 #include <ogdf/basic/GraphCopy.h>
00056 
00057 #include <ogdf/augmentation/PlanarAugmentation.h>
00058 
00059 
00060 namespace ogdf {
00061 
00062 
00063 
00068 class OGDF_EXPORT PlanarAugmentationFix : public AugmentationModule {
00069 
00070 public:
00072     PlanarAugmentationFix() { }
00073 
00074     ~PlanarAugmentationFix() { }
00075 
00076 
00077 protected:
00078 
00085     void doCall(Graph& g, List<edge>& L);
00086     
00087 private:    
00091     CombinatorialEmbedding* m_pEmbedding;
00092     
00096     CombinatorialEmbedding* m_pActEmbedding;
00097     
00101     Graph* m_pGraph;
00102 
00106     List<edge>* m_pResult;
00107     
00111     DynamicBCTree* m_pBCTree;
00112     
00116     GraphCopy m_graphCopy;
00117     
00121     EdgeArray<edge> m_eCopy;
00122 
00126     List<label> m_labels;
00127     
00132     NodeArray< ListIterator<label> > m_isLabel;
00133     
00137     NodeArray<label> m_belongsTo;
00138     
00142     NodeArray< ListIterator<node> > m_belongsToIt;
00143 
00147     node m_actBCRoot;
00148 
00149 private:
00150 
00154     void augment(adjEntry adjOuterFace);
00155     
00159     void modifyBCRoot(node oldRoot, node newRoot);
00160     
00164     void changeBCRoot(node oldRoot, node newRoot);
00165 
00169     void reduceChain(node pendant);
00170 
00174     paStopCause followPath(node v, node& last);
00175     
00179     bool findMatching(node& pendant1, node& pendant2, adjEntry& v1, adjEntry& v2);
00180     
00184     void findMatchingRev(node& pendant1, node& pendant2, adjEntry& v1, adjEntry& v2);
00185 
00189     label newLabel(node cutvertex, node parent, node pendant, paStopCause whyStop);
00190 
00194     void addPendant(node p, label& l);
00195 
00199     ListIterator<label> insertLabel(label l);
00200 
00204     void connectPendants(node pendant1, node pendant2, adjEntry adjV1, adjEntry adjV2);
00205 
00209     void connectSingleLabel();
00210 
00214     void deletePendant(node pendant);
00215 
00219     void deleteLabel(label& l, bool removePendants = true);
00220     
00224     void removeLabel(label& l);
00225     
00226 };  // class PlanarAugmentationFix
00227 
00228 
00229 } // namespace ogdf
00230 
00231 #endif