Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

FlowCompaction.h
Go to the documentation of this file.
1 
34 #pragma once
35 
37 #include <ogdf/planarity/PlanRep.h>
41 
42 namespace ogdf {
43 
44 template<class ATYPE> class CompactionConstraintGraph;
45 
48 {
49 public:
51  explicit FlowCompaction(int maxImprovementSteps = 0,
52  int costGen = 1,
53  int costAssoc = 1);
54 
56  void constructiveHeuristics(
57  PlanRep &PG,
58  OrthoRep &OR,
59  const RoutingChannel<int> &rc,
60  GridLayoutMapped &drawing);
61 
62 
64  void improvementHeuristics(
65  PlanRep &PG,
66  OrthoRep &OR,
67  const RoutingChannel<int> &rc,
68  GridLayoutMapped &drawing);
69 
71  void improvementHeuristics(
72  PlanRep &PG,
73  OrthoRep &OR,
74 #if 0
75  const
76 #endif
78  GridLayoutMapped &drawing,
79  int originalSeparation //the input value before multiplication test for compaction improvement
80  );
81 
82  //
83  // options
84 
86  void maxImprovementSteps(int maxSteps) {
87  m_maxImprovementSteps = maxSteps;
88  }
89 
91  int maxImprovementSteps() const {
92  return m_maxImprovementSteps;
93  }
94 
96  void costGen(int c) {
97  m_costGen = c;
98  }
99 
101  int costGen() const {
102  return m_costGen;
103  }
104 
106  void costAssoc(int c) {
107  m_costAssoc = c;
108  }
109 
111  int costAssoc() const {
112  return m_costAssoc;
113  }
114 
116  void scalingSteps(int sc) {m_scalingSteps = sc;}
117 
119  void align(bool b) {m_align = b;}
120 
121 
122 private:
123  void computeCoords(
125  NodeArray<int> &pos,
126  bool fixZeroLength = false,
127  bool fixVertexSize = false,
128  bool improvementHeuristics = false,
129  bool onlyGen = false);
130  void dfsAssignPos(
131  NodeArray<bool> &visited,
132  NodeArray<int> &pos,
133  node v,
134  int x);
135 
136  // options
138  int m_costGen;
141  //int m_costCage; //!< preliminary: Carsten uses 10
144  bool m_align;
145 
146 
149 };
150 
151 
152 } // end namespace ogdf
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of orthogonal representation of planar graphs.
Extends GridLayout by a grid mapping mechanism.
int m_costAssoc
cost of arcs in constraint graph corresponding to associations
int costAssoc() const
returns option costGen
Represents a constraint graph used for compaction.
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:237
int m_costGen
cost of arcs in constraint graph corresponding to generalization
Declaration of a base class for planar representations of graphs and cluster graphs.
void scalingSteps(int sc)
sets number of separation scaling improvement steps
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
void costAssoc(int c)
sets cost of arcs in constraint graph corresponding to associations
bool m_cageExpense
should cageedges be more expensive than others? will be propagated to compactionConstraintGraph ...
Declaration of class RoutingChannel which maintains required size of routing channels and separation...
represents compaction algorithm using min-cost flow in the dual of the constraint graph ...
int m_numGenSteps
number of steps reserved for generalization compaction
void align(bool b)
set alignment option
EdgeArray< int > m_flow
int m_scalingSteps
number of improvement steps with decreasing separation
bool m_align
toggle if brother nodes in hierarchies should be aligned
int m_maxImprovementSteps
maximal number of improvement steps
EdgeArray< edge > m_dualEdge
Class for the representation of nodes.
Definition: Graph_d.h:167
int costGen() const
returns option costGen
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
void maxImprovementSteps(int maxSteps)
sets option maxImprovementSteps, which is the maximal number of steps performed by improvementHeurist...
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
The namespace for all OGDF objects.
void costGen(int c)
sets cost of arcs in constraint graph corresponding to generalizations
int maxImprovementSteps() const
returns option maxImprovementSteps
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60