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
41
42namespace ogdf {
43
44template<class ATYPE>
45class CompactionConstraintGraph;
46
49public:
51 explicit FlowCompaction(int maxImprovementSteps = 0, int costGen = 1, int costAssoc = 1);
52
56
57
61
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
99private:
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
110 //int m_costCage; //!< preliminary: Carsten uses 10
113 bool m_align;
114
117};
118
119}
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
Declaration of orthogonal representation of planar graphs.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
Represents a constraint graph used for compaction.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
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)
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Orthogonal representation of an embedded graph.
Definition OrthoRep.h:219
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
Maintains input sizes for constructive compaction (size of routing channels, separation,...
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.