Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / planarity / MMSubgraphPlanarizer.h
blobc5427df2d1db5f06a85ade00819211d39dd1d715
1 /*
2 * $Revision: 2523 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Declaration of class MMSubgraphPlanarizer.
12 * \author Carsten Gutwenger
14 * \par License:
15 * This file is part of the Open Graph Drawing Framework (OGDF).
17 * \par
18 * Copyright (C)<br>
19 * See README.txt in the root directory of the OGDF installation for details.
21 * \par
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
26 * for details.
28 * \par
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.
34 * \par
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>
53 namespace ogdf
56 /**
57 * \brief Planarization approach for minor-monotone crossing minimization.
60 class OGDF_EXPORT MMSubgraphPlanarizer : public MMCrossingMinimizationModule
62 public:
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; }
82 protected:
83 virtual ReturnType doCall(PlanRepExpansion &PG,
84 int cc,
85 const EdgeArray<bool> *forbid,
86 int& crossingNumber,
87 int& numNS,
88 int& numSN);
90 private:
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.
99 #endif