Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00042 #ifdef _MSC_VER
00043 #pragma once
00044 #endif
00045
00046 #ifndef OGDF_VARIABLE_EMBEDDING_INSERTER_H
00047 #define OGDF_VARIABLE_EMBEDDING_INSERTER_H
00048
00049
00050 #include <ogdf/module/EdgeInsertionModule.h>
00051 #include <ogdf/basic/CombinatorialEmbedding.h>
00052 #include <ogdf/basic/FaceArray.h>
00053
00054
00055 namespace ogdf {
00056
00057 class OGDF_EXPORT PlanarSPQRTree;
00058 class OGDF_EXPORT ExpandedGraph;
00059 class OGDF_EXPORT PlaneGraphCopy;
00060
00061
00062 class OGDF_EXPORT BiconnectedComponent;
00063
00064
00066
00076 class OGDF_EXPORT VariableEmbeddingInserter : public EdgeInsertionModule
00077 {
00078 public:
00080 VariableEmbeddingInserter();
00081
00082 ~VariableEmbeddingInserter() { }
00083
00092 ReturnType callPostprocessing(PlanRep &PG, const List<edge> &origEdges) {
00093 return doCallPostprocessing(PG, origEdges, false, 0, 0, 0);
00094 }
00095
00096
00102
00103 void removeReinsert(RemoveReinsertType rrOption) {
00104 m_rrOption = rrOption;
00105 }
00106
00108 RemoveReinsertType removeReinsert() const {
00109 return m_rrOption;
00110 }
00111
00112
00114
00118 void percentMostCrossed(double percent) {
00119 m_percentMostCrossed = percent;
00120 }
00121
00123 double percentMostCrossed() const {
00124 return m_percentMostCrossed;
00125 }
00126
00132
00133 int runsPostprocessing() const {
00134 return m_runsPostprocessing;
00135 }
00136
00138
00139 private:
00141 ReturnType doCall(
00142 PlanRep &PG,
00143 const List<edge> &origEdges,
00144 bool forbidCrossingGens,
00145 const EdgeArray<int> *costOrig,
00146
00147 const EdgeArray<bool> *forbiddenEdgeOrig,
00148
00149
00150 const EdgeArray<unsigned int> *edgeSubGraph);
00151
00152
00153 ReturnType doCallPostprocessing(
00154 PlanRep &PG,
00155 const List<edge> &origEdges,
00156 bool forbidCrossingGens,
00157 const EdgeArray<int> *costOrig,
00158
00159 const EdgeArray<bool> *forbiddenEdgeOrig,
00160
00161
00162 const EdgeArray<unsigned int> *edgeSubGraph);
00163
00164 edge crossedEdge(adjEntry adj) const;
00165 int costCrossed(edge eOrig) const;
00166
00167 bool m_forbidCrossingGens;
00168 const EdgeArray<int> *m_costOrig;
00169 const EdgeArray<bool> *m_forbiddenEdgeOrig;
00170 const EdgeArray<unsigned int> *m_edgeSubgraph;
00171 Graph::EdgeType m_typeOfCurrentEdge;
00172
00173 void insert(node s, node t, SList<adjEntry> &eip);
00174 void blockInsert(const BiconnectedComponent &G,
00175 node s,
00176 node t,
00177 List<adjEntry> &L);
00178
00179 bool dfsVertex(node v, int parent);
00180 bool dfsComp(int i, node parent, node &repT);
00181
00182 PlanRep *m_pPG;
00183 node m_s, m_t;
00184 edge m_st;
00185 SList<adjEntry> *m_pEip;
00186
00187 static int m_bigM;
00188
00189 NodeArray<SList<int> > m_compV;
00190 Array<SList<node> > m_nodeB;
00191 Array<SList<edge> > m_edgeB;
00192 NodeArray<node> m_GtoBC;
00193
00194 bool pathSearch(node v, edge parent, List<edge> &path);
00195 void buildSubpath(node v,
00196 edge eIn,
00197 edge eOut,
00198 List<adjEntry> &L,
00199 ExpandedGraph &Exp,
00200 node s,
00201 node t);
00202 edge insertEdge(node v, node w, Graph &Exp,
00203 NodeArray<node> &GtoExp, List<node> &nodesG);
00204
00205 node m_v1, m_v2;
00206
00207 RemoveReinsertType m_rrOption;
00208 double m_percentMostCrossed;
00209
00210 int m_runsPostprocessing;
00211 };
00212
00213 }
00214
00215 #endif