Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
GalaxyLevel.h
Go to the documentation of this file.
1
29#pragma once
30
31#include <ogdf/basic/Graph.h>
32
33namespace ogdf {
34namespace energybased {
35namespace dtree {
36
39public:
42 explicit GalaxyLevel(const Graph& graph);
43
46
48 const Graph& graph() const;
49
51 node parent(node v) const;
52
54 double weight(node v) const;
55
57 double edgeWeight(edge e) const;
58
60 void setWeight(node v, double weight);
61
63 void setEdgeWeight(edge e, double weight);
64
66 bool isFinestLevel() const;
67
69 bool isCoarsestLevel() const;
70
73
76
84 GalaxyLevel* buildLevelsUntil(int maxNumNodes);
85
86private:
89
92
95
98
101
104
107
110
113};
114
115}
116}
117}
Includes declaration of graph class.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Class for the representation of edges.
Definition Graph_d.h:300
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Simple implementation of the slightly modified version of Hachul by Gronemann.
Definition GalaxyLevel.h:38
const Graph & graph() const
returns the graph
void removeParEdgesWithWeight()
remove par edges with weight
GalaxyLevel * nextCoarser()
return the next coarser one
EdgeArray< double > m_edgeWeight
edge weight
bool isFinestLevel() const
returns true if this is the level of the original graph
GalaxyLevel * buildLevelsUntil(int maxNumNodes)
Builds all levels until the graph has less than maxNumNodes.
void setWeight(node v, double weight)
returns the weight of a node
GalaxyLevel * m_pNextFiner
pointer to the next finer level
Definition GalaxyLevel.h:97
double weight(node v) const
returns the weight of a node
~GalaxyLevel()
destructor, deletes this level and all subsequent i.e coarser ones
GalaxyLevel * m_pNextCoarser
pointer to the next coarser
GalaxyLevel(GalaxyLevel *pNextFiner)
private constructor for creating a coarser level
NodeArray< double > m_nodeWeight
the weight of the node is the sum of weights of the children
void setEdgeWeight(edge e, double weight)
returns the edge weight of e
bool isCoarsestLevel() const
returns true if this is the coarsest level
double edgeWeight(edge e) const
returns the edge weight of e
GalaxyLevel * buildNextCoarserLevel(int numLabels=3)
creates a new coarser version of this graph
GalaxyLevel * nextFiner()
return the next finer one
NodeArray< node > m_parent
pointer to the parent node on the coarser level
node parent(node v) const
returns the parent node of a node on the coarser level
GalaxyLevel(const Graph &graph)
constructor for the finest level i.e. the original graph
#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.