Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ScalingLayout.h
Go to the documentation of this file.
1
32#pragma once
33
37
38#include <memory>
39
40namespace ogdf {
41
43
48public:
52 enum class ScalingType {
54 RelativeToDrawing,
60 RelativeToAvgLength,
62 RelativeToDesiredLength,
64 Absolute
65 };
66
68
69 using MultilevelLayoutModule::call;
70
76 virtual void call(GraphAttributes& GA) override;
77
83 virtual void call(MultilevelGraph& MLG) override;
84
91 void setScaling(double min, double max);
92
98 void setExtraScalingSteps(unsigned int steps);
99
106
113
120
126 void setLayoutRepeats(unsigned int repeats);
127 //TODO: only a workaround, this should be retrieved from the layout module
128 //when we have a interface class on top of Layoutmodule that allows this
130
131private:
132 // Usually a simple force-directed / energy-based Layout should be chosen.
133 std::unique_ptr<LayoutModule> m_secondaryLayoutModule;
134
139
140 // 0 = scale to maxScaling only
142
143 unsigned int m_layoutRepeats;
144
146};
147
148}
MMM is a Multilevel Graph drawing Algorithm that can use different modules.
MLG is the main data structure for ModularMultilevelMixer.
Declaration of interface for layout algorithms that allow calls with a MultilevelGraph parameter (cla...
Stores additional attributes of a graph (like layout information).
Interface of general layout algorithms.
Modular multilevel graph layout.
Interface of general layout algorithms that also allow a MultilevelGraph as call parameter,...
Scales a graph layout and calls a secondary layout algorithm.
unsigned int m_layoutRepeats
void setMMM(ModularMultilevelMixer *mmm)
Is used to compute the scaling relatively to the level size change when ScalingType st_absolute is us...
ModularMultilevelMixer * m_mmm
Used to derive level size ratio if st_absolute.
void setScaling(double min, double max)
Sets the minimum and the maximum scaling factor.
ScalingType m_scalingType
void setSecondaryLayout(LayoutModule *layout)
Sets a LayoutModule that should be applied after scaling.
virtual void call(GraphAttributes &GA) override
Computes a layout of graph GA.
void setExtraScalingSteps(unsigned int steps)
Sets how often the scaling should be repeated.
void setDesiredEdgeLength(double eLength)
virtual void call(MultilevelGraph &MLG) override
Computes a layout of graph MLG.
void setLayoutRepeats(unsigned int repeats)
Sets how often the LayoutModule should be applied.
void setScalingType(ScalingType type)
Sets a ScalingType wich sets the relative scale for the Graph.
std::unique_ptr< LayoutModule > m_secondaryLayoutModule
unsigned int m_extraScalingSteps
ScalingType
To define the relative scale used for a Graph, the ScalingType is applied.
#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.