Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
FlowCompaction.h
Go to the documentation of this file.
1
34#pragma once
35
36#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/basic.h>
39
40namespace ogdf {
41
42class GridLayoutMapped;
43class OrthoRep;
44class PlanRep;
45template<class ATYPE>
46class CompactionConstraintGraph;
47template<class ATYPE>
48class MinimumEdgeDistances;
49
52public:
54 explicit FlowCompaction(int maxImprovementSteps = 0, int costGen = 1, int costAssoc = 1);
55
58 GridLayoutMapped& drawing);
59
60
63 GridLayoutMapped& drawing);
64
67#if 0
68 const
69#endif
71 int originalSeparation //the input value before multiplication test for compaction improvement
72 );
73
74 //
75 // options
76
78 void maxImprovementSteps(int maxSteps) { m_maxImprovementSteps = maxSteps; }
79
81 int maxImprovementSteps() const { return m_maxImprovementSteps; }
82
84 void costGen(int c) { m_costGen = c; }
85
87 int costGen() const { return m_costGen; }
88
90 void costAssoc(int c) { m_costAssoc = c; }
91
93 int costAssoc() const { return m_costAssoc; }
94
96 void scalingSteps(int sc) { m_scalingSteps = sc; }
97
99 void align(bool b) { m_align = b; }
100
101
102private:
104 bool fixZeroLength = false, bool fixVertexSize = false,
105 bool improvementHeuristics = false, bool onlyGen = false);
106 void dfsAssignPos(NodeArray<bool>& visited, NodeArray<int>& pos, node v, int x);
107
108 // options
113 //int m_costCage; //!< preliminary: Carsten uses 10
116 bool m_align;
117
120};
121
122}
Includes declaration of graph class.
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
Basic declarations, included by all source files.
Represents a constraint graph used for compaction.
represents compaction algorithm using min-cost flow in the dual of the constraint graph
void costAssoc(int c)
sets cost of arcs in constraint graph corresponding to associations
void dfsAssignPos(NodeArray< bool > &visited, NodeArray< int > &pos, node v, int x)
EdgeArray< edge > m_dualEdge
bool m_cageExpense
should cageedges be more expensive than others? will be propagated to compactionConstraintGraph
void improvementHeuristics(PlanRep &PG, OrthoRep &OR, const RoutingChannel< int > &rc, GridLayoutMapped &drawing)
call of improvement heuristics for orthogonal drawing (variable cages)
bool m_align
toggle if brother nodes in hierarchies should be aligned
void align(bool b)
set alignment option
int m_costAssoc
cost of arcs in constraint graph corresponding to associations
void improvementHeuristics(PlanRep &PG, OrthoRep &OR, MinimumEdgeDistances< int > &minDist, GridLayoutMapped &drawing, int originalSeparation)
call of improvement heuristics for orthogonal drawing (tight cages)
int m_numGenSteps
number of steps reserved for generalization compaction
int m_maxImprovementSteps
maximal number of improvement steps
void costGen(int c)
sets cost of arcs in constraint graph corresponding to generalizations
EdgeArray< int > m_flow
FlowCompaction(int maxImprovementSteps=0, int costGen=1, int costAssoc=1)
construction
int costAssoc() const
returns option costGen
int m_scalingSteps
number of improvement steps with decreasing separation
void scalingSteps(int sc)
sets number of separation scaling improvement steps
int costGen() const
returns option costGen
int maxImprovementSteps() const
returns option maxImprovementSteps
void maxImprovementSteps(int maxSteps)
sets option maxImprovementSteps, which is the maximal number of steps performed by improvementHeurist...
int m_costGen
cost of arcs in constraint graph corresponding to generalization
void constructiveHeuristics(PlanRep &PG, OrthoRep &OR, const RoutingChannel< int > &rc, GridLayoutMapped &drawing)
call of constructive heuristics for orthogonal representation
void computeCoords(CompactionConstraintGraph< int > &D, NodeArray< int > &pos, bool fixZeroLength=false, bool fixVertexSize=false, bool improvementHeuristics=false, bool onlyGen=false)
Extends GridLayout by a grid mapping mechanism.
Maintains input sizes for improvement compaction (deltas and epsilons)
Class for the representation of nodes.
Definition Graph_d.h:241
Orthogonal representation of an embedded graph.
Definition OrthoRep.h:225
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
Maintains input sizes for constructive compaction (size of routing channels, separation,...
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.