6 * $Date: 2012-07-03 23:05:08 +0200 (Tue, 03 Jul 2012) $
7 ***************************************************************/
10 * \brief Offers variety of possible algorithm calls for simultaneous
13 * \author Michael Schulz
16 * This file is part of the Open Graph Drawing Framework (OGDF).
20 * See README.txt in the root directory of the OGDF installation for details.
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
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.
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 #ifndef OGDF_SIMDRAW_CALLER_H
45 #define OGDF_SIMDRAW_CALLER_H
47 #include <ogdf/simultaneous/SimDrawManipulatorModule.h>
52 //! Calls modified algorithms for simdraw instances
54 * Runs special algorithms suitable for simultaneous drawing
55 * on current SimDraw instance. The algorithms take
56 * care of all necessary GraphAttributes activations and
57 * take over calculated coordinates and dummy nodes.
59 * A typical use of SimDrawCaller involves a predefined SimDraw
60 * instance on which SimDrawCaller works.
64 * SimDrawCaller SDC(SD);
65 * SDC.callSubgraphPlanarizer();
68 class OGDF_EXPORT SimDrawCaller
: public SimDrawManipulatorModule
72 EdgeArray
<unsigned int> *m_esg
; //!< saves edgeSubGraph data
76 * Should be called whenever graph changed and current
77 * basic graph membership is needed.
83 SimDrawCaller(SimDraw
&SD
);
85 //! runs SugiyamaLayout with modified SplitHeuristic
87 * Runs special call of SugiyamaLayout using
88 * SugiyamaLayout::setSubgraphs().
89 * Saves node coordinates and dummy node bends in current
92 * Uses TwoLayerCrossMinSimDraw object to perform crossing
93 * minimization. The default is SplitHeuristic.
95 * Automatically activates GraphAttributes::nodeGraphics.\n
96 * Automatically activates GraphAttributes::edgeGraphics.
98 void callSugiyamaLayout();
100 //! runs UMLPlanarizationLayout with modified inserter
102 * Runs UMLPlanarizationLayout with callSimDraw and retransfers
103 * node coordinates and dummy node bend to current simdraw
106 * Automatically activates GraphAttributes::nodeGraphics.\n
107 * Automatically activates GraphAttributes::edgeGraphics.
109 void callUMLPlanarizationLayout();
111 //! runs SubgraphPlanarizer with modified inserter
113 * Runs SubgraphPlanarizer on connected component \a cc with simdraw
114 * call. Integer edge costs of GraphAttributes are used
115 * (1 for each edge if not available).
117 * Modifies graph by inserting dummy nodes for each crossing.
118 * All dummy nodes are marked as dummy.
119 * (Method SimDrawColorizer::addColorNodeVersion is recommended
120 * for visualizing dummy nodes.)
122 * No layout is calculated. The result is a planar graph.
124 int callSubgraphPlanarizer(int cc
= 0, int numberOfPermutations
= 1);
128 } // end namespace ogdf