34namespace energybased {
Includes declaration of graph class.
Dynamic arrays indexed with edges.
Class for the representation of edges.
Data type for general directed graphs (adjacency list representation).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Simple implementation of the slightly modified version of Hachul by Gronemann.
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
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
Graph * m_pGraph
the 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.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.