34 namespace energybased {
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
void setEdgeWeight(edge e, double weight)
returns the edge weight of e
Data type for general directed graphs (adjacency list representation).
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
Simple implementation of the slightly modified version of Hachul by Gronemann.
Class for the representation of edges.
Class for the representation of nodes.
GalaxyLevel * m_pNextCoarser
pointer to the next coarser
GalaxyLevel * m_pNextFiner
pointer to the next finer level
GalaxyLevel * buildNextCoarserLevel(int numLabels=3)
creates a new coarser version of this graph
EdgeArray< double > m_edgeWeight
edge weight
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
Graph * m_pGraph
the graph
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.