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_UPWARD_PLANAR_SUBGRAPH_SIMPLE_H 00050 #define OGDF_UPWARD_PLANAR_SUBGRAPH_SIMPLE_H 00051 00052 00053 00054 00055 #include <ogdf/module/UpwardPlanarSubgraphModule.h> 00056 #include <ogdf/basic/tuples.h> 00057 00058 00059 namespace ogdf { 00060 00061 //--------------------------------------------------------- 00062 // UpwardPlanarSubgraphSimple 00063 // implements a maximal planar subgraph algorithm using 00064 // planarity testing 00065 //--------------------------------------------------------- 00066 class OGDF_EXPORT UpwardPlanarSubgraphSimple : public UpwardPlanarSubgraphModule 00067 { 00068 public: 00069 // construction 00070 UpwardPlanarSubgraphSimple() { } 00071 // destruction 00072 ~UpwardPlanarSubgraphSimple() { } 00073 00074 // computes set of edges delEdges, which have to be deleted 00075 // in order to get a planar subgraph; edges in preferedEdges 00076 // should be contained in planar subgraph 00077 void call(const Graph &G, List<edge> &delEdges); 00078 00079 void call(GraphCopy &GC, List<edge> &delEdges); 00080 00081 00082 private: 00083 bool checkAcyclic( 00084 GraphCopySimple &graphAcyclicTest, 00085 SList<Tuple2<node,node> > &tmpAugmented); 00086 00087 void dfsBuildSpanningTree( 00088 node v, 00089 SListPure<edge> &treeEdges, 00090 NodeArray<bool> &visited); 00091 00092 }; 00093 00094 00095 } // end namespace ogdf 00096 00097 #endif