Open
Graph Drawing
Framework

 v.2012.05
 

EmbedderMinDepthPiTa.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00045 #ifdef _MSC_VER
00046 #pragma once
00047 #endif
00048 
00049 #ifndef OGDF_EMBEDDER_MIN_DEPTH_PITA_H
00050 #define OGDF_EMBEDDER_MIN_DEPTH_PITA_H
00051 
00052 #define USE_EXTENDED_DEPTH_DEFINITION
00053 
00054 #include <ogdf/module/EmbedderModule.h>
00055 #include <ogdf/decomposition/BCTree.h>
00056 
00057 namespace ogdf {
00058 
00060 class OGDF_EXPORT EmbedderMinDepthPiTa : public EmbedderModule
00061 {
00062 public:
00063     //constructor
00064     EmbedderMinDepthPiTa() { }
00065 
00072     void call(PlanRep& PG, adjEntry& adjExternal);
00073 
00074 private:
00082     void embedBlocks(const node& bT, const node& cH);
00083 
00090     void embedCutVertex(const node& vT, bool root = false);
00091 
00098     void embedBlockVertex(const node& bT, const node& parent_cT);
00099 
00106     int computeBlockCutfaceTreeEdgeLengths(const node& n);
00107 
00113     void computeTdiam(const node& n);
00114 
00123     void invertPath(Graph& G, const node& n, const edge& e);
00124 
00134     node computeBlockMapping(const node& bDG,
00135                              const node& parent,
00136                              List<node>& blocksNodes,
00137                              List<node>& childBlocks);
00138 
00146     int eccentricityBottomUp(const node& nT);
00147 
00154     void eccentricityTopDown(const node& nT);
00155 
00162     int depthBlock(const node&  bT/*, const node& parent_cT*/);
00163 
00169     int depthCutvetex(const node&  cT);
00170 
00178     void deleteDummyNodes(PlanRep& PG, adjEntry& adjExternal);
00179 
00180 private:
00182     BCTree* pBCTree;
00183 
00185     Graph bcTreePG;
00186 
00188     NodeArray<node> nBCTree_to_npBCTree;
00189 
00191     NodeArray<node> npBCTree_to_nBCTree;
00192 
00194     adjEntry* pAdjExternal;
00195 
00197     NodeArray<Graph> blockG;
00198 
00200     NodeArray< NodeArray<node> > nH_to_nBlockEmbedding;
00201 
00203     NodeArray< EdgeArray<edge> > eH_to_eBlockEmbedding;
00204 
00206     NodeArray< NodeArray<node> > nBlockEmbedding_to_nH;
00207 
00209     NodeArray< EdgeArray<edge> > eBlockEmbedding_to_eH;
00210     
00212     NodeArray< NodeArray<int> > nodeLength;
00213 
00215     EdgeArray<int> m_cB;
00216 
00219     NodeArray< List<node> > M_B;
00220 
00222     EdgeArray<int> edgeLength_blockCutfaceTree;
00223 
00225     Graph Tdiam;
00226 
00228     bool Tdiam_initialized;
00229 
00231     NodeArray<node> nBlockCutfaceTree_to_nTdiam;
00232 
00234     NodeArray<node> nTdiam_to_nBlockCutfaceTree;
00235 
00237     node knotTdiam;
00238 
00240     adjEntry tmpAdjExtFace;
00241 
00244     List< List<adjEntry> > faces;
00245 
00247     List<node> fPG_to_nDG;
00248 
00250     NodeArray<int> nDG_to_fPG;
00251 
00253     Graph blockCutfaceTree;
00254 
00256     BCTree* pm_blockCutfaceTree;
00257 
00259     NodeArray<node> nBlockCutfaceTree_to_nm_blockCutfaceTree;
00260 
00262     NodeArray<node> nm_blockCutfaceTree_to_nBlockCutfaceTree;
00263 
00265     NodeArray<node> bPG_to_bDG;
00266 
00268     NodeArray<node> bDG_to_bPG;
00269 
00271     NodeArray<int> eccentricity_alt;
00272 
00274     NodeArray<int> eccentricity;
00275 
00278     List<node> oneEdgeBlockNodes;
00279 
00280 #ifdef USE_EXTENDED_DEPTH_DEFINITION
00281 
00283     List<node> dummyNodes;
00284 #endif
00285 
00287     NodeArray< List<adjEntry> > newOrder;
00288 
00291     NodeArray<Graph> G_nT;
00292 
00294     NodeArray< NodeArray<node> > nG_nT_to_nPG;
00295 
00297     NodeArray< NodeArray<node> > nPG_to_nG_nT;
00298 
00300     NodeArray< EdgeArray<edge> > eG_nT_to_ePG;
00301 
00303     NodeArray< EdgeArray<edge> > ePG_to_eG_nT;
00304 
00306     NodeArray<adjEntry> Gamma_adjExt_nT;
00307 };
00308 
00309 } // end namespace ogdf
00310 
00311 #endif