Open
Graph Drawing
Framework

 v.2012.05
 

MaximumPlanarSubgraph.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  
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046 
00047 #ifndef OGDF_MAXIMUM_PLANAR_SUBGRAPH_H
00048 #define OGDF_MAXIMUM_PLANAR_SUBGRAPH_H
00049 
00050 #include <ogdf/basic/Module.h>
00051 #include <ogdf/basic/Timeouter.h>
00052 
00053 #include <ogdf/module/PlanarSubgraphModule.h>
00054 #include <ogdf/cluster/ClusterGraph.h>
00055 
00056 #include <ogdf/external/abacus.h>
00057 
00058 namespace ogdf {
00059 
00060 //--------------------------------------------------------------------------
00061 //MaximumPlanarSubgraph
00062 //Exact computation of a maximum planar subgraph
00063 //--------------------------------------------------------------------------
00064 class OGDF_EXPORT MaximumPlanarSubgraph : public PlanarSubgraphModule
00065 {
00066 
00067 #ifndef USE_ABACUS
00068 protected:
00069     virtual ReturnType doCall(const Graph &G,
00070             const List<edge> &preferedEdges,
00071             List<edge> &delEdges,
00072             const EdgeArray<int>  *pCost,
00073             bool preferedImplyPlanar)
00074     { THROW_NO_ABACUS_EXCEPTION; return retError; };
00075 };
00076 #else // Use_ABACUS
00077 
00078 public:
00079     // Construction
00080     MaximumPlanarSubgraph() {}
00081     // Destruction
00082     virtual ~MaximumPlanarSubgraph() {}
00083     
00084 protected:
00085     // Implements the Planar Subgraph interface.
00086     // For the given graph \a G, a clustered graph with only
00087     // a single root cluster is generated.
00088     // Computes set of edges delEdges, which have to be deleted
00089     // in order to get a planar subgraph; edges in preferredEdges
00090     // should be contained in planar subgraph.
00091     // Status: pCost and preferredEdges are ignored in current implementation.
00092     virtual ReturnType doCall(const Graph &G,
00093             const List<edge> &preferredEdges,
00094             List<edge> &delEdges,
00095             const EdgeArray<int>  *pCost,
00096             bool preferredImplyPlanar);
00097 };
00098 
00099 #endif // USE_ABACUS
00100 
00101 } //end namespace ogdf
00102 
00103 
00104 #endif // OGDF_MAXIMUM_PLANAR_SUBGRAPH_H