Open
Graph Drawing
Framework

 v.2007.11
 

VariableEmbeddingInserter.h

Go to the documentation of this file.
00001 /*
00002  * $Revision: 1.8 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2007-11-13 21:44:33 +0100 (Di, 13 Nov 2007) $ 
00007  ***************************************************************/
00008 
00050 #ifdef _MSC_VER
00051 #pragma once
00052 #endif
00053 
00054 #ifndef OGDF_VARIABLE_EMBEDDING_INSERTER_H
00055 #define OGDF_VARIABLE_EMBEDDING_INSERTER_H
00056 
00057 
00058 #include <ogdf/module/EdgeInsertionModule.h>
00059 #include <ogdf/basic/CombinatorialEmbedding.h>
00060 #include <ogdf/basic/FaceArray.h>
00061 
00062 
00063 namespace ogdf {
00064 
00065 class PlanarSPQRTree;
00066 class ExpandedGraph;
00067 class PlaneGraphCopy;
00068 
00069 
00070 class BiconnectedComponent;
00071 
00072 
00074 
00084 class VariableEmbeddingInserter : public EdgeInsertionModule
00085 {
00086 public:
00088     VariableEmbeddingInserter();
00089 
00090     ~VariableEmbeddingInserter() { }
00091 
00097 
00098     void removeReinsert(RemoveReinsertType rrOption) {
00099         m_rrOption = rrOption;
00100     }
00101 
00103     RemoveReinsertType removeReinsert() const {
00104         return m_rrOption;
00105     }
00106 
00107 
00109 
00113     void percentMostCrossed(double percent) {
00114         m_percentMostCrossed = percent;
00115     }
00116 
00118     double percentMostCrossed() const {
00119         return m_percentMostCrossed;
00120     }
00121 
00127 
00128     int runsPostprocessing() const {
00129         return m_runsPostprocessing;
00130     }
00131 
00133 
00134 private:
00136     ReturnType doCall(
00137         PlanRep &PG,                  // planarized representation
00138         const List<edge> &origEdges,     // original edge to be inserted
00139         bool forbidCrossingGens,         // frobid crossings between gen's
00140         const EdgeArray<int> *costOrig,  // pointer to array of cost of
00141                               // original edges; if pointer is0 all costs are 1
00142         const EdgeArray<bool> *forbiddenEdgeOrig, // pointer to array deciding
00143                 // which original edges are forbidden to cross; if pointer is
00144                 // is 0 no edges are explicitly forbidden to cross
00145         const EdgeArray<unsigned int> *edgeSubGraph); // pointer to array of SubGraphInformation
00146     // used in Simultaneous Drawing
00147 
00148     edge crossedEdge(adjEntry adj) const;
00149     int costCrossed(edge eOrig) const;
00150         
00151     bool                   m_forbidCrossingGens;
00152     const EdgeArray<int>  *m_costOrig;
00153     const EdgeArray<bool> *m_forbiddenEdgeOrig;
00154     const EdgeArray<unsigned int>  *m_edgeSubgraph;
00155     Graph::EdgeType        m_typeOfCurrentEdge;
00156 
00157     void insert(node s, node t, SList<adjEntry> &eip);
00158     void blockInsert(const BiconnectedComponent &G,
00159         node s,
00160         node t,
00161         List<adjEntry> &L);
00162 
00163     bool dfsVertex(node v, int parent);
00164     bool dfsComp(int i, node parent, node &repT);
00165 
00166     PlanRep *m_pPG;
00167     node   m_s, m_t;
00168     edge   m_st;
00169     SList<adjEntry> *m_pEip;
00170 
00171     static int m_bigM;  // used for SimDraw
00172 
00173     NodeArray<SList<int> > m_compV;
00174     Array<SList<node> >    m_nodeB;
00175     Array<SList<edge> >    m_edgeB;
00176     NodeArray<node>        m_GtoBC;
00177 
00178     bool pathSearch(node v, edge parent, List<edge> &path);
00179     void buildSubpath(node v,
00180         edge eIn,
00181         edge eOut,
00182         List<adjEntry> &L,
00183         ExpandedGraph &Exp,
00184         node s,
00185         node t);
00186     edge insertEdge(node v, node w, Graph &Exp,
00187         NodeArray<node> &GtoExp, List<node> &nodesG);
00188 
00189     node m_v1, m_v2;
00190 
00191     RemoveReinsertType m_rrOption; 
00192     double m_percentMostCrossed;   
00193 
00194     int m_runsPostprocessing; 
00195 };
00196 
00197 } // end namespace ogdf
00198 
00199 #endif


© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:04 2007 by doxygen 1.5.4.