Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MultilevelBuilder.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
36
37namespace ogdf {
38
40
44private:
55 virtual bool buildOneLevel(MultilevelGraph& MLG) = 0;
56
57protected:
58 // if set to true the length of the edge between two merged nodes will be added to
59 // all edges that are moved to the other node in this merge.
62
63public:
64 virtual ~MultilevelBuilder() { }
65
66 MultilevelBuilder() : m_adjustEdgeLengths(0), m_numLevels(1) { }
67
69 m_numLevels = 1;
70 MLG.updateReverseIndizes();
71 MLG.updateMergeWeights();
72 while (buildOneLevel(MLG)) {
73 m_numLevels++;
74 }
75 MLG.updateReverseIndizes();
76 }
77
78 void setEdgeLengthAdjustment(int factor) { m_adjustEdgeLengths = factor; }
79
80 int getNumLevels() { return m_numLevels; }
81};
82
83}
Includes declaration of graph class.
MLG is the main data structure for ModularMultilevelMixer.
Base class for merger modules.
void setEdgeLengthAdjustment(int factor)
virtual void buildAllLevels(MultilevelGraph &MLG)
int m_numLevels
stores number of levels for statistics purposes
virtual bool buildOneLevel(MultilevelGraph &MLG)=0
This method constructs one more level on top of an existing MultilevelGraph.
#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.