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#include <ogdf/basic/basic.h>
33
34namespace ogdf {
35namespace energybased {
36namespace dtree {
37
40public:
43 explicit GalaxyLevel(const Graph& graph);
44
47
49 const Graph& graph() const;
50
52 node parent(node v) const;
53
55 double weight(node v) const;
56
58 double edgeWeight(edge e) const;
59
61 void setWeight(node v, double weight);
62
64 void setEdgeWeight(edge e, double weight);
65
67 bool isFinestLevel() const;
68
70 bool isCoarsestLevel() const;
71
74
77
85 GalaxyLevel* buildLevelsUntil(int maxNumNodes);
86
87private:
90
93
96
99
102
105
108
111
114};
115
116}
117}
118}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Class for the representation of nodes.
Definition Graph_d.h:241
Simple implementation of the slightly modified version of Hachul by Gronemann.
Definition GalaxyLevel.h:39
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:98
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
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.