Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046
00047
00048 #ifndef OGDF_VARIABLE_EMBEDDING_INSERTER_2_H
00049 #define OGDF_VARIABLE_EMBEDDING_INSERTER_2_H
00050
00051
00052 #include <ogdf/module/EdgeInsertionModule.h>
00053
00054
00055 namespace ogdf {
00056
00057 class OGDF_EXPORT BCandSPQRtrees;
00058 class OGDF_EXPORT ExpandedGraph2;
00059
00060
00061
00062
00063
00064
00065
00066 class OGDF_EXPORT VariableEmbeddingInserter2 : public EdgeInsertionModule
00067 {
00068 public:
00069
00070 VariableEmbeddingInserter2();
00071
00072 virtual ~VariableEmbeddingInserter2() { }
00073
00074
00075
00076
00077
00078
00079
00080
00081 void removeReinsert(RemoveReinsertType rrOption) {
00082 m_rrOption = rrOption;
00083 }
00084
00085
00086 RemoveReinsertType removeReinsert() const {
00087 return m_rrOption;
00088 }
00089
00090
00091
00092
00093
00094 void percentMostCrossed(double percent) {
00095 m_percentMostCrossed = percent;
00096 }
00097
00098
00099 double percentMostCrossed() const {
00100 return m_percentMostCrossed;
00101 }
00102
00103
00104
00105
00106 int runsPostprocessing() const {
00107 return m_runsPostprocessing;
00108 }
00109
00110 private:
00111
00112 ReturnType doCall(
00113 PlanRep &PG,
00114 const List<edge> &origEdges,
00115 bool forbidCrossingGens,
00116 const EdgeArray<int> *costOrig,
00117
00118 const EdgeArray<bool> *forbiddenEdgeOrig);
00119
00120
00121
00122 edge crossedEdge(adjEntry adj) const;
00123 int costCrossed(edge eOrig) const;
00124
00125 bool m_forbidCrossingGens;
00126 const EdgeArray<int> *m_costOrig;
00127 const EdgeArray<bool> *m_forbiddenEdgeOrig;
00128 Graph::EdgeType m_typeOfCurrentEdge;
00129
00130 void insert(edge eOrig, SList<adjEntry> &eip);
00131 void blockInsert(node s, node t, List<adjEntry> &L);
00132
00133 PlanRep *m_pPG;
00134
00135 BCandSPQRtrees *m_pBC;
00136
00137 void buildSubpath(node v,
00138 node vPred,
00139 node vSucc,
00140 List<adjEntry> &L,
00141 ExpandedGraph2 &Exp,
00142 node s,
00143 node t);
00144 edge insertEdge(node v, node w, Graph &Exp,
00145 NodeArray<node> &GtoExp, List<node> &nodesG);
00146
00147
00148
00149 RemoveReinsertType m_rrOption;
00150 double m_percentMostCrossed;
00151
00152
00153 int m_runsPostprocessing;
00154
00155 };
00156
00157
00158 }
00159
00160
00161 #endif