Scales a graph layout and calls a secondary layout algorithm.
More...
#include <ogdf/energybased/multilevel_mixer/ScalingLayout.h>
Scales a graph layout and calls a secondary layout algorithm.
For use with ModularMultilevelMixer.
Definition at line 50 of file ScalingLayout.h.
◆ ScalingType
To define the relative scale used for a Graph, the ScalingType is applied.
Enumerator |
---|
RelativeToDrawing | Scales by a factor relative to the drawing.
|
RelativeToAvgLength | Scales by a factor relative to the avg edge weights to be used in combination with the fixed edge length setting in ModularMultilevelMixer.
|
RelativeToDesiredLength | Scales by a factor relative to the desired Edgelength m_desEdgeLength.
|
Absolute | Absolute factor, can be used to scale relative to level size change.
|
Definition at line 55 of file ScalingLayout.h.
◆ ScalingLayout()
ogdf::ScalingLayout::ScalingLayout |
( |
| ) |
|
◆ call() [1/4]
Computes a layout of graph GA
.
- Parameters
-
GA | is the input graph and will also be assigned the layout information. |
Implements ogdf::MultilevelLayoutModule.
◆ call() [2/4]
virtual void ogdf::MultilevelLayoutModule::call |
|
override |
Computes a layout of graph GA
.
This method is the actual algorithm call and must be implemented by derived classes.
- Parameters
-
GA | is the input graph and will also be assigned the layout information. |
◆ call() [3/4]
virtual void ogdf::MultilevelLayoutModule::call |
|
inline |
Computes a layout of graph MLG.
This method can be implemented optionally to allow a LayoutModule to modify the Graph. This allows some Layout Algorithms to save Memory, compared to a normal call(GA) DO NOT implement this if you are not sure whether this would save you Memory! This method only helps if the Graph is already in the MultiLevelGraph Format (or can be converted without creating a copy) AND the layout would need a copy otherwise. All Incremental Layouts (especially energy based) CAN be called by ModularMultilevelMixer. The standard implementation converts the MLG to GA and uses call(GA).
If implemented, the following Implementation of call(GA) is advised to ensure consistent behaviour of the two call Methods: void YourLayout::call(GraphAttributes &GA) { MultilevelGraph MLG(GA); call(MLG); MLG.exportAttributes(GA); }
- Parameters
-
MLG | is the input graph and will also be assigned the layout information. |
Definition at line 86 of file MultilevelLayoutModule.h.
◆ call() [4/4]
Computes a layout of graph MLG
.
- Parameters
-
MLG | is the input graph and will also be assigned the layout information. |
Reimplemented from ogdf::MultilevelLayoutModule.
◆ setDesiredEdgeLength()
void ogdf::ScalingLayout::setDesiredEdgeLength |
( |
double |
eLength | ) |
|
◆ setExtraScalingSteps()
void ogdf::ScalingLayout::setExtraScalingSteps |
( |
unsigned int |
steps | ) |
|
Sets how often the scaling should be repeated.
- Parameters
-
steps | is the number of repeats |
◆ setLayoutRepeats()
void ogdf::ScalingLayout::setLayoutRepeats |
( |
unsigned int |
repeats | ) |
|
Sets how often the LayoutModule should be applied.
- Parameters
-
repeats | is the number of repeats |
◆ setMMM()
Is used to compute the scaling relatively to the level size change when ScalingType st_absolute is used.
- Parameters
-
◆ setScaling()
void ogdf::ScalingLayout::setScaling |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
Sets the minimum and the maximum scaling factor.
- Parameters
-
min | sets the minimum |
max | sets the maximum |
◆ setScalingType()
void ogdf::ScalingLayout::setScalingType |
( |
ScalingType |
type | ) |
|
Sets a ScalingType wich sets the relative scale for the Graph.
- Parameters
-
◆ setSecondaryLayout()
void ogdf::ScalingLayout::setSecondaryLayout |
( |
LayoutModule * |
layout | ) |
|
Sets a LayoutModule that should be applied after scaling.
- Parameters
-
◆ m_desEdgeLength
double ogdf::ScalingLayout::m_desEdgeLength |
|
private |
◆ m_extraScalingSteps
unsigned int ogdf::ScalingLayout::m_extraScalingSteps |
|
private |
◆ m_layoutRepeats
unsigned int ogdf::ScalingLayout::m_layoutRepeats |
|
private |
◆ m_maxScaling
double ogdf::ScalingLayout::m_maxScaling |
|
private |
◆ m_minScaling
double ogdf::ScalingLayout::m_minScaling |
|
private |
◆ m_mmm
Used to derive level size ratio if st_absolute.
Definition at line 140 of file ScalingLayout.h.
◆ m_scalingType
◆ m_secondaryLayoutModule
std::unique_ptr<LayoutModule> ogdf::ScalingLayout::m_secondaryLayoutModule |
|
private |
The documentation for this class was generated from the following file: