Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LongestPathCompaction.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <ogdf/basic/tuples.h>
39 #include <ogdf/planarity/PlanRep.h>
40 
41 namespace ogdf {
42 
43 template<class ATYPE>
44 class CompactionConstraintGraph;
45 
64 public:
66  explicit LongestPathCompaction(bool tighten = true, int maxImprovementSteps = 0);
67 
69  void constructiveHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
70  GridLayoutMapped& drawing);
71 
72 
74  void improvementHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
75  GridLayoutMapped& drawing);
76 
77  //
78  // options
79 
81  void tighten(bool select) { m_tighten = select; }
82 
84  bool tighten() const { return m_tighten; }
85 
87  void maxImprovementSteps(int maxSteps) { m_maxImprovementSteps = maxSteps; }
88 
90  int maxImprovementSteps() const { return m_maxImprovementSteps; }
91 
92 
93 private:
94  void computeCoords(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
95 
96  void applyLongestPaths(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
97 
98  void moveComponents(const CompactionConstraintGraph<int>& D, NodeArray<int>& pos);
99 
100 
101  // options
102  bool m_tighten;
104 
107 };
108 
109 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
ogdf::LongestPathCompaction::m_tighten
bool m_tighten
Tighten pseudo-components.
Definition: LongestPathCompaction.h:102
ogdf::LongestPathCompaction::tighten
bool tighten() const
Returns the option tighten.
Definition: LongestPathCompaction.h:84
GridLayoutMapped.h
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:833
PlanRep.h
Declaration of a base class for planar representations of graphs and cluster graphs.
ogdf::LongestPathCompaction::m_pseudoSources
SList< node > m_pseudoSources
The list of pseudo-sources.
Definition: LongestPathCompaction.h:105
ogdf::LongestPathCompaction::maxImprovementSteps
int maxImprovementSteps() const
Returns the option max improvement steps.
Definition: LongestPathCompaction.h:90
OrthoRep.h
Declaration of orthogonal representation of planar graphs.
ogdf::OrthoRep
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:219
ogdf::LongestPathCompaction::tighten
void tighten(bool select)
Sets option tighten to select.
Definition: LongestPathCompaction.h:81
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
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:106
ogdf::GridLayoutMapped
Extends GridLayout by a grid mapping mechanism.
Definition: GridLayoutMapped.h:46
ogdf::LongestPathCompaction::m_maxImprovementSteps
int m_maxImprovementSteps
The maximal number of improvement steps.
Definition: LongestPathCompaction.h:103
ogdf::LongestPathCompaction::maxImprovementSteps
void maxImprovementSteps(int maxSteps)
Sets the option max improvement steps.
Definition: LongestPathCompaction.h:87
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:106
tuples.h
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.
ogdf::LongestPathCompaction
Compaction algorithm using longest paths in the constraint graph.
Definition: LongestPathCompaction.h:63
ogdf::RoutingChannel< int >