Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00052 #ifdef _MSC_VER
00053 #pragma once
00054 #endif
00055
00056 #ifndef OGDF_VARIABLE_EMBEDDING_INSERTER_H
00057 #define OGDF_VARIABLE_EMBEDDING_INSERTER_H
00058
00059
00060 #include <ogdf/module/EdgeInsertionModule.h>
00061 #include <ogdf/basic/CombinatorialEmbedding.h>
00062 #include <ogdf/basic/FaceArray.h>
00063
00064
00065 namespace ogdf {
00066
00067 class OGDF_EXPORT PlanarSPQRTree;
00068 class OGDF_EXPORT ExpandedGraph;
00069 class OGDF_EXPORT PlaneGraphCopy;
00070
00071
00072 class OGDF_EXPORT BiconnectedComponent;
00073
00074
00076
00086 class OGDF_EXPORT VariableEmbeddingInserter : public EdgeInsertionModule
00087 {
00088 public:
00090 VariableEmbeddingInserter();
00091
00092 ~VariableEmbeddingInserter() { }
00093
00099
00100 void removeReinsert(RemoveReinsertType rrOption) {
00101 m_rrOption = rrOption;
00102 }
00103
00105 RemoveReinsertType removeReinsert() const {
00106 return m_rrOption;
00107 }
00108
00109
00111
00115 void percentMostCrossed(double percent) {
00116 m_percentMostCrossed = percent;
00117 }
00118
00120 double percentMostCrossed() const {
00121 return m_percentMostCrossed;
00122 }
00123
00129
00130 int runsPostprocessing() const {
00131 return m_runsPostprocessing;
00132 }
00133
00135
00136 private:
00138 ReturnType doCall(
00139 PlanRep &PG,
00140 const List<edge> &origEdges,
00141 bool forbidCrossingGens,
00142 const EdgeArray<int> *costOrig,
00143
00144 const EdgeArray<bool> *forbiddenEdgeOrig,
00145
00146
00147 const EdgeArray<unsigned int> *edgeSubGraph);
00148
00149
00150 edge crossedEdge(adjEntry adj) const;
00151 int costCrossed(edge eOrig) const;
00152
00153 bool m_forbidCrossingGens;
00154 const EdgeArray<int> *m_costOrig;
00155 const EdgeArray<bool> *m_forbiddenEdgeOrig;
00156 const EdgeArray<unsigned int> *m_edgeSubgraph;
00157 Graph::EdgeType m_typeOfCurrentEdge;
00158
00159 void insert(node s, node t, SList<adjEntry> &eip);
00160 void blockInsert(const BiconnectedComponent &G,
00161 node s,
00162 node t,
00163 List<adjEntry> &L);
00164
00165 bool dfsVertex(node v, int parent);
00166 bool dfsComp(int i, node parent, node &repT);
00167
00168 PlanRep *m_pPG;
00169 node m_s, m_t;
00170 edge m_st;
00171 SList<adjEntry> *m_pEip;
00172
00173 static int m_bigM;
00174
00175 NodeArray<SList<int> > m_compV;
00176 Array<SList<node> > m_nodeB;
00177 Array<SList<edge> > m_edgeB;
00178 NodeArray<node> m_GtoBC;
00179
00180 bool pathSearch(node v, edge parent, List<edge> &path);
00181 void buildSubpath(node v,
00182 edge eIn,
00183 edge eOut,
00184 List<adjEntry> &L,
00185 ExpandedGraph &Exp,
00186 node s,
00187 node t);
00188 edge insertEdge(node v, node w, Graph &Exp,
00189 NodeArray<node> &GtoExp, List<node> &nodesG);
00190
00191 node m_v1, m_v2;
00192
00193 RemoveReinsertType m_rrOption;
00194 double m_percentMostCrossed;
00195
00196 int m_runsPostprocessing;
00197 };
00198
00199 }
00200
00201 #endif