Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FlowCompaction.h
Go to the documentation of this file.
1 
34 #pragma once
35 
40 #include <ogdf/planarity/PlanRep.h>
41 
42 namespace ogdf {
43 
44 template<class ATYPE>
45 class CompactionConstraintGraph;
46 
49 public:
51  explicit FlowCompaction(int maxImprovementSteps = 0, int costGen = 1, int costAssoc = 1);
52 
54  void constructiveHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
55  GridLayoutMapped& drawing);
56 
57 
59  void improvementHeuristics(PlanRep& PG, OrthoRep& OR, const RoutingChannel<int>& rc,
60  GridLayoutMapped& drawing);
61 
63  void improvementHeuristics(PlanRep& PG, OrthoRep& OR,
64 #if 0
65  const
66 #endif
68  int originalSeparation //the input value before multiplication test for compaction improvement
69  );
70 
71  //
72  // options
73 
75  void maxImprovementSteps(int maxSteps) { m_maxImprovementSteps = maxSteps; }
76 
78  int maxImprovementSteps() const { return m_maxImprovementSteps; }
79 
81  void costGen(int c) { m_costGen = c; }
82 
84  int costGen() const { return m_costGen; }
85 
87  void costAssoc(int c) { m_costAssoc = c; }
88 
90  int costAssoc() const { return m_costAssoc; }
91 
93  void scalingSteps(int sc) { m_scalingSteps = sc; }
94 
96  void align(bool b) { m_align = b; }
97 
98 
99 private:
100  void computeCoords(CompactionConstraintGraph<int>& D, NodeArray<int>& pos,
101  bool fixZeroLength = false, bool fixVertexSize = false,
102  bool improvementHeuristics = false, bool onlyGen = false);
103  void dfsAssignPos(NodeArray<bool>& visited, NodeArray<int>& pos, node v, int x);
104 
105  // options
107  int m_costGen;
110  //int m_costCage; //!< preliminary: Carsten uses 10
113  bool m_align;
114 
117 };
118 
119 }
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::FlowCompaction::costAssoc
void costAssoc(int c)
sets cost of arcs in constraint graph corresponding to associations
Definition: FlowCompaction.h:87
ogdf::FlowCompaction::m_numGenSteps
int m_numGenSteps
number of steps reserved for generalization compaction
Definition: FlowCompaction.h:111
GridLayoutMapped.h
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
ogdf::FlowCompaction::m_maxImprovementSteps
int m_maxImprovementSteps
maximal number of improvement steps
Definition: FlowCompaction.h:106
ogdf::FlowCompaction::maxImprovementSteps
int maxImprovementSteps() const
returns option maxImprovementSteps
Definition: FlowCompaction.h:78
ogdf::FlowCompaction::m_costAssoc
int m_costAssoc
cost of arcs in constraint graph corresponding to associations
Definition: FlowCompaction.h:108
PlanRep.h
Declaration of a base class for planar representations of graphs and cluster graphs.
ogdf::FlowCompaction::maxImprovementSteps
void maxImprovementSteps(int maxSteps)
sets option maxImprovementSteps, which is the maximal number of steps performed by improvementHeurist...
Definition: FlowCompaction.h:75
OrthoRep.h
Declaration of orthogonal representation of planar graphs.
ogdf::OrthoRep
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:219
MinimumEdgeDistances.h
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
ogdf::FlowCompaction::m_costGen
int m_costGen
cost of arcs in constraint graph corresponding to generalization
Definition: FlowCompaction.h:107
ogdf::FlowCompaction::costGen
int costGen() const
returns option costGen
Definition: FlowCompaction.h:84
ogdf::FlowCompaction::costGen
void costGen(int c)
sets cost of arcs in constraint graph corresponding to generalizations
Definition: FlowCompaction.h:81
ogdf::FlowCompaction::m_align
bool m_align
toggle if brother nodes in hierarchies should be aligned
Definition: FlowCompaction.h:113
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::FlowCompaction::costAssoc
int costAssoc() const
returns option costGen
Definition: FlowCompaction.h:90
ogdf::FlowCompaction::scalingSteps
void scalingSteps(int sc)
sets number of separation scaling improvement steps
Definition: FlowCompaction.h:93
ogdf::FlowCompaction::m_dualEdge
EdgeArray< edge > m_dualEdge
Definition: FlowCompaction.h:115
ogdf::FlowCompaction::align
void align(bool b)
set alignment option
Definition: FlowCompaction.h:96
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::FlowCompaction
represents compaction algorithm using min-cost flow in the dual of the constraint graph
Definition: FlowCompaction.h:48
ogdf::FlowCompaction::m_scalingSteps
int m_scalingSteps
number of improvement steps with decreasing separation
Definition: FlowCompaction.h:112
ogdf::GridLayoutMapped
Extends GridLayout by a grid mapping mechanism.
Definition: GridLayoutMapped.h:46
RoutingChannel.h
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
ogdf::MinimumEdgeDistances< int >
ogdf::CompactionConstraintGraph
Represents a constraint graph used for compaction.
Definition: CompactionConstraintGraph.h:106
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::FlowCompaction::m_flow
EdgeArray< int > m_flow
Definition: FlowCompaction.h:116
ogdf::FlowCompaction::m_cageExpense
bool m_cageExpense
should cageedges be more expensive than others? will be propagated to compactionConstraintGraph
Definition: FlowCompaction.h:109
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::RoutingChannel< int >