Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LongestPathCompaction.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/SList.h>
37 #include <ogdf/basic/basic.h>
39 
40 namespace ogdf {
41 
42 class GridLayoutMapped;
43 class OrthoRep;
44 class PlanRep;
45 template<class ATYPE>
46 class CompactionConstraintGraph;
47 
66 public:
68  explicit LongestPathCompaction(bool tighten = true, int maxImprovementSteps = 0);
69 
71  void constructiveHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
72  GridLayoutMapped& drawing);
73 
74 
76  void improvementHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
77  GridLayoutMapped& drawing);
78 
79  //
80  // options
81 
83  void tighten(bool select) { m_tighten = select; }
84 
86  bool tighten() const { return m_tighten; }
87 
89  void maxImprovementSteps(int maxSteps) { m_maxImprovementSteps = maxSteps; }
90 
92  int maxImprovementSteps() const { return m_maxImprovementSteps; }
93 
94 
95 private:
96  void computeCoords(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
97 
98  void applyLongestPaths(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
99 
100  void moveComponents(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
101 
102 
103  // options
104  bool m_tighten;
106 
109 };
110 
111 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
ogdf::LongestPathCompaction::m_tighten
bool m_tighten
Tighten pseudo-components.
Definition: LongestPathCompaction.h:104
ogdf::LongestPathCompaction::tighten
bool tighten() const
Returns the option tighten.
Definition: LongestPathCompaction.h:86
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::LongestPathCompaction::m_pseudoSources
SList< node > m_pseudoSources
The list of pseudo-sources.
Definition: LongestPathCompaction.h:107
ogdf::LongestPathCompaction::maxImprovementSteps
int maxImprovementSteps() const
Returns the option max improvement steps.
Definition: LongestPathCompaction.h:92
ogdf::OrthoRep
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:225
ogdf::LongestPathCompaction::tighten
void tighten(bool select)
Sets option tighten to select.
Definition: LongestPathCompaction.h:83
SList.h
Declaration of singly linked lists and iterators.
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::LongestPathCompaction::m_component
NodeArray< int > m_component
The pseudo component of a node.
Definition: LongestPathCompaction.h:108
ogdf::GridLayoutMapped
Extends GridLayout by a grid mapping mechanism.
Definition: GridLayoutMapped.h:49
ogdf::LongestPathCompaction::m_maxImprovementSteps
int m_maxImprovementSteps
The maximal number of improvement steps.
Definition: LongestPathCompaction.h:105
ogdf::LongestPathCompaction::maxImprovementSteps
void maxImprovementSteps(int maxSteps)
Sets the option max improvement steps.
Definition: LongestPathCompaction.h:89
RoutingChannel.h
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
ogdf::CompactionConstraintGraph
Represents a constraint graph used for compaction.
Definition: CompactionConstraintGraph.h:120
ogdf::LongestPathCompaction
Compaction algorithm using longest paths in the constraint graph.
Definition: LongestPathCompaction.h:65
ogdf::RoutingChannel< int >