Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

LongestPathCompaction.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <ogdf/planarity/PlanRep.h>
38 #include <ogdf/basic/tuples.h>
40 
41 namespace ogdf {
42 
43 template<class ATYPE> class CompactionConstraintGraph;
44 
63 {
64 public:
66  explicit LongestPathCompaction(bool tighten = true,
67  int maxImprovementSteps = 0);
68 
70  void constructiveHeuristics(
71  PlanRep &PG,
72  OrthoRep &OR,
73  const RoutingChannel<int> &rc,
74  GridLayoutMapped &drawing);
75 
76 
78  void improvementHeuristics(
79  PlanRep &PG,
80  OrthoRep &OR,
81  const RoutingChannel<int> &rc,
82  GridLayoutMapped &drawing);
83 
84  //
85  // options
86 
88  void tighten(bool select) {
89  m_tighten = select;
90  }
91 
93  bool tighten() const {
94  return m_tighten;
95  }
96 
97 
99  void maxImprovementSteps(int maxSteps) {
100  m_maxImprovementSteps = maxSteps;
101  }
102 
104  int maxImprovementSteps() const {
105  return m_maxImprovementSteps;
106  }
107 
108 
109 private:
110  void computeCoords(
112  NodeArray<int> &pos);
113 
114  void applyLongestPaths(const CompactionConstraintGraph<int> &D,
115  NodeArray<int> &pos);
116 
117  void moveComponents(const CompactionConstraintGraph<int> &D,
118  NodeArray<int> &pos);
119 
120 
121  // options
122  bool m_tighten;
124 
127 };
128 
129 
130 } // end namespace ogdf
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
int m_maxImprovementSteps
The maximal number of improvement steps.
Declaration of orthogonal representation of planar graphs.
Extends GridLayout by a grid mapping mechanism.
Represents a constraint graph used for compaction.
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:237
Declaration of a base class for planar representations of graphs and cluster graphs.
bool tighten() const
Returns the option tighten.
Singly linked lists (maintaining the length of the list).
Definition: SList.h:777
Declaration of class RoutingChannel which maintains required size of routing channels and separation...
int maxImprovementSteps() const
Returns the option max improvement steps.
Compaction algorithm using longest paths in the constraint graph.
void tighten(bool select)
Sets option tighten to select.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
NodeArray< int > m_component
The pseudo component of a node.
bool m_tighten
Tighten pseudo-components.
void maxImprovementSteps(int maxSteps)
Sets the option max improvement steps.
The namespace for all OGDF objects.
SList< node > m_pseudoSources
The list of pseudo-sources.
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60