6 * $Date: 2012-07-12 02:38:07 +0200 (Do, 12. Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of an interface for c-planar subgraph algorithms.
12 * \author Karsten Klein
15 * This file is part of the Open Graph Drawing Framework (OGDF).
19 * See README.txt in the root directory of the OGDF installation for details.
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * Version 2 or 3 as published by the Free Software Foundation;
25 * see the file LICENSE.txt included in the packaging of this file
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
35 * You should have received a copy of the GNU General Public
36 * License along with this program; if not, write to the Free
37 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
38 * Boston, MA 02110-1301, USA.
40 * \see http://www.gnu.org/copyleft/gpl.html
41 ***************************************************************/
48 #ifndef OGDF_CPLANAR_SUBGRAPH_MODULE_H
49 #define OGDF_CPLANAR_SUBGRAPH_MODULE_H
51 #include <ogdf/basic/Module.h>
52 #include <ogdf/basic/Timeouter.h>
54 #include <ogdf/cluster/ClusterGraph.h>
55 //#include <ogdf/internal/cluster/MaxCPlanar_Master.h>
59 //--------------------------------------------------------------------------
60 //CPlanarSubgraphModule
61 //base class of algorithms for the computation of c-planar subgraphs
62 //--------------------------------------------------------------------------
65 * \brief Interface of algorithms for the computation of c-planar subgraphs.
67 class CPlanarSubgraphModule
: public Module
, public Timeouter
71 //! Constructs a cplanar subgraph module
72 CPlanarSubgraphModule() {}
74 virtual ~CPlanarSubgraphModule() {}
77 * \brief Computes set of edges delEdges, which have to be deleted
78 * in order to get a c-planar subgraph.
80 * Must be implemented by derived classes.
81 * @param G is the clustergraph.
82 * @param delEdges holds the edges not in the subgraph on return.
85 ReturnType
call(const ClusterGraph
&G
, List
<edge
> &delEdges
) {
86 return doCall(G
, delEdges
);
93 * \brief Computes a maximum c-planar subgraph.
95 * If delEdges is empty on return, the clustered graph G is c-planar-
96 * The actual algorithm call that must be implemented by derived classes!
98 * @param CG is the given cluster graph.
99 * @param delEdges holds the set of edges that have to be deleted.
101 virtual ReturnType
doCall(const ClusterGraph
&CG
,
102 List
<edge
> &delEdges
) = 0;
104 OGDF_MALLOC_NEW_DELETE
107 } //end namespace ogdf
110 #endif // OGDF_CPLANAR_SUBGRAPH_MODULE_H