Open
Graph Drawing
Framework
v. 2023.09 (Elderberry)
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
MultilevelBuilder.h
Go to the documentation of this file.
1
32
#pragma once
33
34
#include <
ogdf/basic/basic.h
>
35
#include <
ogdf/energybased/multilevel_mixer/MultilevelGraph.h
>
36
37
namespace
ogdf
{
38
40
43
class
OGDF_EXPORT
MultilevelBuilder
{
44
private
:
55
virtual
bool
buildOneLevel(
MultilevelGraph
& MLG) = 0;
56
57
protected
:
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.
60
int
m_adjustEdgeLengths
;
61
int
m_numLevels
;
62
63
public
:
64
virtual
~MultilevelBuilder
() { }
65
66
MultilevelBuilder
() : m_adjustEdgeLengths(0), m_numLevels(1) { }
67
68
virtual
void
buildAllLevels
(
MultilevelGraph
& MLG) {
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
}
ogdf
The namespace for all OGDF objects.
Definition:
multilevelmixer.cpp:39
ogdf::MultilevelBuilder::MultilevelBuilder
MultilevelBuilder()
Definition:
MultilevelBuilder.h:66
ogdf::MultilevelBuilder::~MultilevelBuilder
virtual ~MultilevelBuilder()
Definition:
MultilevelBuilder.h:64
ogdf::MultilevelGraph
Definition:
MultilevelGraph.h:69
ogdf::MultilevelGraph::updateReverseIndizes
void updateReverseIndizes()
ogdf::MultilevelBuilder::buildAllLevels
virtual void buildAllLevels(MultilevelGraph &MLG)
Definition:
MultilevelBuilder.h:68
ogdf::MultilevelBuilder::setEdgeLengthAdjustment
void setEdgeLengthAdjustment(int factor)
Definition:
MultilevelBuilder.h:78
ogdf::MultilevelBuilder::getNumLevels
int getNumLevels()
Definition:
MultilevelBuilder.h:80
ogdf::MultilevelBuilder
Base class for merger modules.
Definition:
MultilevelBuilder.h:43
ogdf::MultilevelBuilder::m_adjustEdgeLengths
int m_adjustEdgeLengths
Definition:
MultilevelBuilder.h:60
MultilevelGraph.h
MLG is the main data structure for ModularMultilevelMixer.
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition:
config.h:101
ogdf::MultilevelBuilder::m_numLevels
int m_numLevels
stores number of levels for statistics purposes
Definition:
MultilevelBuilder.h:61
ogdf::MultilevelGraph::updateMergeWeights
void updateMergeWeights()
include
ogdf
energybased
multilevel_mixer
MultilevelBuilder.h
This site is powered by Netlify.
© 1999–2024
The OGDF Team