6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of interface for upward planar subgraph
13 * \author Carsten Gutwenger
16 * This file is part of the Open Graph Drawing Framework (OGDF).
20 * See README.txt in the root directory of the OGDF installation for details.
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License
25 * Version 2 or 3 as published by the Free Software Foundation;
26 * see the file LICENSE.txt included in the packaging of this file
30 * This program is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
36 * You should have received a copy of the GNU General Public
37 * License along with this program; if not, write to the Free
38 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
39 * Boston, MA 02110-1301, USA.
41 * \see http://www.gnu.org/copyleft/gpl.html
42 ***************************************************************/
49 #ifndef OGDF_UPWARD_PLANAR_SUBGRAPH_MODULE_H
50 #define OGDF_UPWARD_PLANAR_SUBGRAPH_MODULE_H
54 #include <ogdf/basic/GraphCopy.h>
60 * \brief Interface for algorithms for computing an upward planar subgraph.
62 class OGDF_EXPORT UpwardPlanarSubgraphModule
{
64 //! Initializes an upward planar subgraph module.
65 UpwardPlanarSubgraphModule() { }
68 virtual ~UpwardPlanarSubgraphModule() { }
71 * \brief Computes set of edges \a delEdges which have to be deleted to obtain the upward planar subgraph.
73 * Must be implemented by derived classes.
74 * @param G is the input graph.
75 * @param delEdges is assigned the set of edges which have to be deleted in \a G
76 * to obtain the upward planar subgraph.
78 virtual void call(const Graph
&G
, List
<edge
> &delEdges
) = 0;
81 //! Computes set of edges \a delEdges which have to be deleted to obtain the upward planar subgraph.
82 void operator()(const Graph
&G
, List
<edge
> &delEdges
) {
88 * \brief Makes \a GC upward planar by deleting edges.
89 * @param GC is a copy of the input graph.
90 * @param delOrigEdges is the set of original edges whose copies have been
93 void callAndDelete(GraphCopy
&GC
, List
<edge
> &delOrigEdges
);
97 OGDF_MALLOC_NEW_DELETE
98 }; // class UpwardPlanarSubgraph
102 } // end namespace ogdf