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 00044 #ifdef _MSC_VER 00045 #pragma once 00046 #endif 00047 00048 00049 #ifndef OGDF_NON_PLANAR_CORE_H 00050 #define OGDF_NON_PLANAR_CORE_H 00051 00052 00053 #include <ogdf/basic/Graph.h> 00054 #include <ogdf/basic/NodeArray.h> 00055 #include <ogdf/basic/EdgeArray.h> 00056 00057 00058 namespace ogdf { 00059 00060 class OGDF_EXPORT SPQRTree; 00061 class OGDF_EXPORT Skeleton; 00062 00063 00064 //--------------------------------------------------------- 00065 // NonPlanarCore 00066 //--------------------------------------------------------- 00067 class OGDF_EXPORT NonPlanarCore 00068 { 00069 public: 00070 NonPlanarCore(const Graph &G); 00071 00072 const Graph &core() const { return m_graph; } 00073 const Graph &originalGraph() const { return *m_pOriginal; } 00074 00075 node original(node v) const { return m_orig[v]; } 00076 00077 bool isVirtual(edge e) const { return m_real[e] == 0; } 00078 edge realEdge(edge e) const { return m_real[e]; } 00079 00080 const EdgeArray<int> &cost() const { return m_cost; } 00081 int cost(edge e) const { return m_cost[e]; } 00082 const List<edge> &mincut(edge e) const { return m_mincut[e]; } 00083 00084 protected: 00085 void markCore(const SPQRTree &T, NodeArray<bool> &mark); 00086 void traversingPath(Skeleton &S, edge eS, List<edge> &path, NodeArray<node> &mapV); 00087 00088 Graph m_graph; 00089 const Graph *m_pOriginal; 00090 00091 NodeArray<node> m_orig; // corresp. original node 00092 EdgeArray<edge> m_real; // corresp. original edge (0 if virtual) 00093 EdgeArray<List<edge> > m_mincut; // traversing path for an edge in the core 00094 EdgeArray<int> m_cost; 00095 }; // class NonPlanarCore 00096 00097 00098 } // end namespace ogdf 00099 00100 00101 #endif