Add tests for UpdateCrypto
[TortoiseGit.git] / ext / OGDF / ogdf / module / AcyclicSubgraphModule.h
blob12d997ba023a45be9453db9267a246ee0835dadc
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 acyclic subgraph algorithms
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 ***************************************************************/
43 #ifdef _MSC_VER
44 #pragma once
45 #endif
47 #ifndef OGDF_ACYCLIC_SUBGRAPH_MODULE_H
48 #define OGDF_ACYCLIC_SUBGRAPH_MODULE_H
52 #include <ogdf/basic/Graph.h>
54 namespace ogdf {
56 /**
57 * \brief Base class of algorithms for computing a maximal acyclic subgraph.
59 * \see SugiyamaLayout
61 class OGDF_EXPORT AcyclicSubgraphModule {
62 public:
63 //! Initializes an acyclic subgraph module.
64 AcyclicSubgraphModule() { }
66 // destruction
67 virtual ~AcyclicSubgraphModule() { }
69 /**
70 * \brief Computes the set of edges \a arcSet which have to be removed
71 * for obtaining an acyclic subgraph of \a G.
73 * This is the actual algorithm call and must be implemented by derived classes.
74 * @param G is the input graph.
75 * @param arcSet is assigned the list of edges that have to be removed in \a G.
77 virtual void call(const Graph &G, List<edge> &arcSet) = 0;
79 /**
80 * \brief Computes the set of edges \a arcSet which have to be removed
81 * for obtaining an acyclic subgraph of \a G.
82 * @param G is the input graph.
83 * @param arcSet is assigned the list of edges that have to be removed in \a G.
85 void operator()(const Graph &G, List<edge> &arcSet) {
86 call(G,arcSet);
89 /**
90 * \brief Makes \a G acyclic by reversing edges.
92 * This method will ignore self-loops in the input graph \a G; thus self-loops
93 * are neither reversed or removed nor added to \a reversed.
94 * @param G is the input graph.
95 * @param reversed is assigned the list of edges that have been reversed in \a G.
97 void callAndReverse(Graph &G, List<edge> &reversed);
99 // makes G acyclic (except for self-loops!) by reversing edges
101 * \brief Makes \a G acyclic by reversing edges.
103 * This method will ignore self-loops in the input graph \a G; thus self-loops
104 * are neither reversed nor removed. This is the simplified version of callAndDelete()
105 * that does not return the list of reversed edges.
106 * @param G is the input graph.
108 void callAndReverse(Graph &G);
110 // makes G acyclic by deleting edges
112 * \brief Makes \a G acyclic by removing edges.
114 * This method will also remove self-loops in the input graph \a G.
115 * @param G is the input graph.
117 void callAndDelete(Graph &G);
119 OGDF_MALLOC_NEW_DELETE
122 } // end namespace ogdf
124 #endif