Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00053 #ifdef _MSC_VER
00054 #pragma once
00055 #endif
00056
00057 #ifndef OGDF_PLANAR_AUGMENTATION_FIX_H
00058 #define OGDF_PLANAR_AUGMENTATION_FIX_H
00059
00060 #include <ogdf/module/AugmentationModule.h>
00061 #include <ogdf/basic/List.h>
00062 #include <ogdf/decomposition/DynamicBCTree.h>
00063 #include <ogdf/basic/CombinatorialEmbedding.h>
00064 #include <ogdf/basic/FaceArray.h>
00065 #include <ogdf/basic/GraphCopy.h>
00066
00067 #include <ogdf/augmentation/PlanarAugmentation.h>
00068
00069
00070 namespace ogdf {
00071
00072
00073
00078 class OGDF_EXPORT PlanarAugmentationFix : public AugmentationModule {
00079
00080 public:
00082 PlanarAugmentationFix() { }
00083
00084 ~PlanarAugmentationFix() { }
00085
00086
00087 protected:
00088
00095 void doCall(Graph& g, List<edge>& L);
00096
00097 private:
00101 CombinatorialEmbedding* m_pEmbedding;
00102
00106 CombinatorialEmbedding* m_pActEmbedding;
00107
00111 Graph* m_pGraph;
00112
00116 List<edge>* m_pResult;
00117
00121 DynamicBCTree* m_pBCTree;
00122
00126 GraphCopy m_graphCopy;
00127
00131 EdgeArray<edge> m_eCopy;
00132
00136 List<label> m_labels;
00137
00142 NodeArray< ListIterator<label> > m_isLabel;
00143
00147 NodeArray<label> m_belongsTo;
00148
00152 NodeArray< ListIterator<node> > m_belongsToIt;
00153
00157 node m_actBCRoot;
00158
00159 private:
00160
00164 void augment(adjEntry adjOuterFace);
00165
00169 void modifyBCRoot(node oldRoot, node newRoot);
00170
00174 void changeBCRoot(node oldRoot, node newRoot);
00175
00179 void reduceChain(node pendant);
00180
00184 paStopCause followPath(node v, node& last);
00185
00189 bool findMatching(node& pendant1, node& pendant2, adjEntry& v1, adjEntry& v2);
00190
00194 void findMatchingRev(node& pendant1, node& pendant2, adjEntry& v1, adjEntry& v2);
00195
00199 label newLabel(node cutvertex, node parent, node pendant, paStopCause whyStop);
00200
00204 void addPendant(node p, label& l);
00205
00209 ListIterator<label> insertLabel(label l);
00210
00214 void connectPendants(node pendant1, node pendant2, adjEntry adjV1, adjEntry adjV2);
00215
00219 void connectSingleLabel();
00220
00224 void deletePendant(node pendant);
00225
00229 void deleteLabel(label& l, bool removePendants = true);
00230
00234 void removeLabel(label& l);
00235
00236 };
00237
00238
00239 }
00240
00241 #endif