6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of class MMSubgraphPlanarizer.
12 * \author Carsten Gutwenger
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 ***************************************************************/
44 #ifndef OGDF_MM_SUBGRAPH_PLANARIZER_H
45 #define OGDF_MM_SUBGRAPH_PLANARIZER_H
47 #include <ogdf/module/MMCrossingMinimizationModule.h>
48 #include <ogdf/module/PlanarSubgraphModule.h>
49 #include <ogdf/module/MMEdgeInsertionModule.h>
50 #include <ogdf/basic/ModuleOption.h>
57 * \brief Planarization approach for minor-monotone crossing minimization.
60 class OGDF_EXPORT MMSubgraphPlanarizer
: public MMCrossingMinimizationModule
63 //! Creates a subgraph planarizer for minor-monotone crossing minimization.
64 MMSubgraphPlanarizer();
66 //! Sets the module option for the computation of the planar subgraph.
67 void setSubgraph(PlanarSubgraphModule
*pSubgraph
) {
68 m_subgraph
.set(pSubgraph
);
71 //! Sets the module option for minor-monotone edge insertion.
72 void setInserter(MMEdgeInsertionModule
*pInserter
) {
73 m_inserter
.set(pInserter
);
76 //! Returns the number of performed permutations in the edge insertion step.
77 int permutations() { return m_permutations
; }
79 //! Sets the number of performed permutations in the edge insertion step.
80 void permutations(int p
) { m_permutations
= p
; }
83 virtual ReturnType
doCall(PlanRepExpansion
&PG
,
85 const EdgeArray
<bool> *forbid
,
91 ModuleOption
<PlanarSubgraphModule
> m_subgraph
; //!< The planar subgraph module.
92 ModuleOption
<MMEdgeInsertionModule
> m_inserter
; //!< The minor-monotone edge insertion module.
94 int m_permutations
; //!< The number of permutations.