Open
Graph Drawing
Framework
v.2012.07
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
LongestPathCompaction.h
Go to the documentation of this file.
1
/*
2
* $Revision: 2523 $
3
*
4
* last checkin:
5
* $Author: gutwenger $
6
* $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7
***************************************************************/
8
45
#ifdef _MSC_VER
46
#pragma once
47
#endif
48
49
50
#ifndef OGDF_LONGEST_PATH_COMPACTION_H
51
#define OGDF_LONGEST_PATH_COMPACTION_H
52
53
54
#include <
ogdf/orthogonal/OrthoRep.h
>
55
#include <
ogdf/planarity/PlanRepUML.h
>
56
#include <
ogdf/internal/orthogonal/RoutingChannel.h
>
57
#include <
ogdf/basic/tuples.h
>
58
#include <
ogdf/basic/GridLayoutMapped.h
>
59
60
61
namespace
ogdf {
62
63
template
<
class
ATYPE>
class
CompactionConstraintGraph;
64
class
Layout;
65
66
84
class
OGDF_EXPORT
LongestPathCompaction
85
{
86
public
:
88
LongestPathCompaction
(
bool
tighten =
true
,
89
int
maxImprovementSteps = 0);
90
92
void
constructiveHeuristics(
93
PlanRepUML
&PG,
94
OrthoRep
&OR,
95
const
RoutingChannel<int>
&rc,
96
GridLayoutMapped
&drawing);
97
98
100
void
improvementHeuristics(
101
PlanRepUML
&PG,
102
OrthoRep
&OR,
103
const
RoutingChannel<int>
&rc,
104
GridLayoutMapped
&drawing);
105
106
//
107
// options
108
110
void
tighten
(
bool
select) {
111
m_tighten = select;
112
}
113
115
bool
tighten
()
const
{
116
return
m_tighten;
117
}
118
119
121
void
maxImprovementSteps
(
int
maxSteps) {
122
m_maxImprovementSteps = maxSteps;
123
}
124
126
int
maxImprovementSteps
()
const
{
127
return
m_maxImprovementSteps;
128
}
129
130
131
private
:
132
void
computeCoords(
133
const
CompactionConstraintGraph<int>
&D,
134
NodeArray<int>
&pos);
135
136
void
applyLongestPaths(
const
CompactionConstraintGraph<int>
&D,
137
NodeArray<int>
&pos);
138
139
void
moveComponents(
const
CompactionConstraintGraph<int>
&D,
140
NodeArray<int>
&pos);
141
142
143
// options
144
bool
m_tighten
;
145
int
m_maxImprovementSteps
;
146
147
SList<node>
m_pseudoSources
;
148
NodeArray<int>
m_component
;
149
};
150
151
152
}
// end namespace ogdf
153
154
155
#endif
ogdf
orthogonal
LongestPathCompaction.h
© 1999-2012 by
TU Dortmund
,
University of Jena
,
University of Cologne
,
University of Sydney
,
oreas GmbH