Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / layered / DfsAcyclicSubgraph.h
blobcbec3d4437889090e827c42f8237cf8fffbd73ed
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 DfsAcyclicSubgraph
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_DFS_ACYCLIC_SUBGRAPH_H
48 #define OGDF_DFS_ACYCLIC_SUBGRAPH_H
52 #include <ogdf/module/AcyclicSubgraphModule.h>
55 namespace ogdf {
57 class GraphAttributes;
61 //! DFS-based algorithm for computing a maximal acyclic subgraph.
62 /**
63 * The algorithm simply removes all DFS-backedges and works in linear-time.
65 class OGDF_EXPORT DfsAcyclicSubgraph : public AcyclicSubgraphModule {
66 public:
67 //! Computes the set of edges \a arcSet, which have to be deleted in the acyclic subgraph.
68 void call (const Graph &G, List<edge> &arcSet);
70 //! Call for UML graph.
71 /**
72 * Computes the set of edges \a arcSet, which have to be deleted
73 * in the acyclic subgraph.
75 void callUML (const GraphAttributes &AG, List<edge> &arcSet);
77 private:
78 int dfsFindHierarchies(
79 const GraphAttributes &AG,
80 NodeArray<int> &hierarchy,
81 int i,
82 node v);
84 void dfsBackedgesHierarchies(
85 const GraphAttributes &AG,
86 node v,
87 NodeArray<int> &number,
88 NodeArray<int> &completion,
89 int &nNumber,
90 int &nCompletion);
95 } // end namespace ogdf
98 #endif