Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / layered / BarycenterHeuristic.h
blobe889cbfa67313fdfe5ccdfa8edccb121e5207837
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 BarycenterHeuristic
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 #ifdef _MSC_VER
45 #pragma once
46 #endif
48 #ifndef OGDF_BARYCENTER_HEURISTIC_H
49 #define OGDF_BARYCENTER_HEURISTIC_H
53 #include <ogdf/module/TwoLayerCrossMin.h>
56 namespace ogdf {
59 //! The barycenter heuristic for 2-layer crossing minimization.
60 class OGDF_EXPORT BarycenterHeuristic : public TwoLayerCrossMin
62 public:
63 //! Initializes crossing minimization for hierarchy \a H.
64 void init (const Hierarchy &H) { m_weight.init(H); }
66 //! Calls the barycenter heuristic for level \a L.
67 void call (Level &L);
69 //! Does some clean-up after calls.
70 void cleanup () { m_weight.init(); }
72 private:
73 NodeArray<double> m_weight; //!< The barycenter weight of the nodes.
77 } // end namespace ogdf
80 #endif