Add tests for UpdateCrypto
[TortoiseGit.git] / ext / OGDF / ogdf / module / MMEdgeInsertionModule.h
blob752a1deb9dc769099f887f93894c9c1b100970c7
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 interface for minor-monotone edge
11 * insertion algorithms.
13 * \author Carsten Gutwenger
15 * \par License:
16 * This file is part of the Open Graph Drawing Framework (OGDF).
18 * \par
19 * Copyright (C)<br>
20 * See README.txt in the root directory of the OGDF installation for details.
22 * \par
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
27 * for details.
29 * \par
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.
35 * \par
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 ***************************************************************/
44 #ifdef _MSC_VER
45 #pragma once
46 #endif
48 #ifndef OGDF_MM_EDGE_INSERTION_MODULE_H
49 #define OGDF_MM_EDGE_INSERTION_MODULE_H
52 #include <ogdf/planarity/PlanRepExpansion.h>
53 #include <ogdf/basic/Module.h>
56 namespace ogdf {
58 /**
59 * \brief Interface for minor-monotone edge insertion algorithms.
61 * \see MMSubgraphPlanarizer
63 class OGDF_EXPORT MMEdgeInsertionModule : public Module {
64 public:
65 //! The postprocessing methods.
66 enum RemoveReinsertType {
67 rrNone, //!< No postprocessing.
68 rrInserted, //!< Postprocessing only with the edges that have to be inserted.
69 rrMostCrossed, //!< Postprocessing with the edges involved in the most crossings.
70 rrAll, //!< Postproceesing with all edges and all node splits.
71 rrIncremental //!< Full postprocessing after each edge insertion.
74 //! Initializes a minor-monotone edge insertion module.
75 MMEdgeInsertionModule() { }
77 // destruction
78 virtual ~MMEdgeInsertionModule() { }
80 /**
81 * \brief Inserts all edges in \a origEdges into \a PG.
83 * @param PG is the input planarized expansion and will also receive the result.
84 * @param origEdges is the list of original edges (edges in the original graph
85 * of \a PG) that have to be inserted.
86 * \return the status of the result.
88 ReturnType call(PlanRepExpansion &PG, const List<edge> &origEdges) {
89 return doCall(PG, origEdges, 0);
92 /**
93 * \brief Inserts all edges in \a origEdges into \a PG and forbids crossing \a forbiddenEdges.
95 * @param PG is the input planarized expansion and will also receive the result.
96 * @param origEdges is the list of original edges (edges in the original graph
97 * of \a PG) that have to be inserted.
98 * @param forbiddenEdgeOrig is an edge array indicating if an original edge is
99 * forbidden to be crossed.
100 * \return the status of the result.
102 ReturnType call(PlanRepExpansion &PG,
103 const List<edge> &origEdges,
104 const EdgeArray<bool> &forbiddenEdgeOrig)
106 return doCall(PG, origEdges, &forbiddenEdgeOrig);
109 protected:
111 * \brief Actual algorithm call that has to be implemented by derived classes.
113 * @param PG is the input planarized expansion and will also receive the result.
114 * @param origEdges is the list of original edges (edges in the original graph
115 * of \a PG) that have to be inserted.
116 * @param forbiddenEdgeOrig points to an edge array indicating if an original edge is
117 * forbidden to be crossed.
119 virtual ReturnType doCall(PlanRepExpansion &PG,
120 const List<edge> &origEdges, const EdgeArray<bool> *forbiddenEdgeOrig) = 0;
123 OGDF_MALLOC_NEW_DELETE
126 } // end namespace ogdf
128 #endif