Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

GalaxyLevel.h
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include <ogdf/basic/Graph.h>
32 
33 namespace ogdf {
34 namespace energybased {
35 namespace dtree {
36 
39 {
40 public:
43  explicit GalaxyLevel(const Graph& graph);
44 
46  ~GalaxyLevel();
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 
87 private:
89  GalaxyLevel* buildNextCoarserLevel(int numLabels = 3);
90 
92  GalaxyLevel(GalaxyLevel* pNextFiner);
93 
96 
99 
102 
105 
108 
111 
114 };
115 
116 }}}
void setWeight(node v, double weight)
returns the weight of a node
GalaxyLevel(const Graph &graph)
constructor for the finest level i.e. the original graph
GalaxyLevel * nextFiner()
return the next finer one
NodeArray< node > m_parent
pointer to the parent node on the coarser level
Definition: GalaxyLevel.h:110
void setEdgeWeight(edge e, double weight)
returns the edge weight of e
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
double weight(node v) const
returns the weight of a node
~GalaxyLevel()
destructor, deletes this level and all subsequent i.e coarser ones
GalaxyLevel * nextCoarser()
return the next coarser one
void removeParEdgesWithWeight()
remove par edges with weight
NodeArray< double > m_nodeWeight
the weight of the node is the sum of weights of the children
Definition: GalaxyLevel.h:107
Simple implementation of the slightly modified version of Hachul by Gronemann.
Definition: GalaxyLevel.h:38
Class for the representation of edges.
Definition: Graph_d.h:291
Class for the representation of nodes.
Definition: Graph_d.h:167
GalaxyLevel * m_pNextCoarser
pointer to the next coarser
Definition: GalaxyLevel.h:101
GalaxyLevel * m_pNextFiner
pointer to the next finer level
Definition: GalaxyLevel.h:98
GalaxyLevel * buildNextCoarserLevel(int numLabels=3)
creates a new coarser version of this graph
EdgeArray< double > m_edgeWeight
edge weight
Definition: GalaxyLevel.h:113
Includes declaration of graph class.
node parent(node v) const
returns the parent node of a node on the coarser level
bool isCoarsestLevel() const
returns true if this is the coarsest level
The namespace for all OGDF objects.
const Graph & graph() const
returns the graph
double edgeWeight(edge e) const
returns the edge weight of e
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.