Simple implementation of the slightly modified version of Hachul by Gronemann. More...
#include <ogdf/energybased/dtree/GalaxyLevel.h>
Public Member Functions | |
GalaxyLevel (const Graph &graph) | |
constructor for the finest level i.e. the original graph More... | |
~GalaxyLevel () | |
destructor, deletes this level and all subsequent i.e coarser ones More... | |
GalaxyLevel * | buildLevelsUntil (int maxNumNodes) |
Builds all levels until the graph has less than maxNumNodes . More... | |
double | edgeWeight (edge e) const |
returns the edge weight of e More... | |
const Graph & | graph () const |
returns the graph More... | |
bool | isCoarsestLevel () const |
returns true if this is the coarsest level More... | |
bool | isFinestLevel () const |
returns true if this is the level of the original graph More... | |
GalaxyLevel * | nextCoarser () |
return the next coarser one More... | |
GalaxyLevel * | nextFiner () |
return the next finer one More... | |
node | parent (node v) const |
returns the parent node of a node on the coarser level More... | |
void | setEdgeWeight (edge e, double weight) |
returns the edge weight of e More... | |
void | setWeight (node v, double weight) |
returns the weight of a node More... | |
double | weight (node v) const |
returns the weight of a node More... | |
Private Member Functions | |
GalaxyLevel (GalaxyLevel *pNextFiner) | |
private constructor for creating a coarser level More... | |
GalaxyLevel * | buildNextCoarserLevel (int numLabels=3) |
creates a new coarser version of this graph More... | |
void | removeParEdgesWithWeight () |
remove par edges with weight More... | |
Private Attributes | |
EdgeArray< double > | m_edgeWeight |
edge weight More... | |
NodeArray< double > | m_nodeWeight |
the weight of the node is the sum of weights of the children More... | |
NodeArray< node > | m_parent |
pointer to the parent node on the coarser level More... | |
Graph * | m_pGraph |
the graph More... | |
GalaxyLevel * | m_pNextCoarser |
pointer to the next coarser More... | |
GalaxyLevel * | m_pNextFiner |
pointer to the next finer level More... | |
Simple implementation of the slightly modified version of Hachul by Gronemann.
Definition at line 39 of file GalaxyLevel.h.
|
explicit |
constructor for the finest level i.e. the original graph
ogdf::energybased::dtree::GalaxyLevel::~GalaxyLevel | ( | ) |
destructor, deletes this level and all subsequent i.e coarser ones
|
private |
private constructor for creating a coarser level
GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::buildLevelsUntil | ( | int | maxNumNodes | ) |
Builds all levels until the graph has less than maxNumNodes
.
In case there are already coarser levels attached to this, it will extend the coarsest if necessary. If not i.e. the coarsest has less than maxNumNodes, it will return the coarsest.
|
private |
creates a new coarser version of this graph
double ogdf::energybased::dtree::GalaxyLevel::edgeWeight | ( | edge | e | ) | const |
returns the edge weight of e
const Graph& ogdf::energybased::dtree::GalaxyLevel::graph | ( | ) | const |
returns the graph
bool ogdf::energybased::dtree::GalaxyLevel::isCoarsestLevel | ( | ) | const |
returns true if this is the coarsest level
bool ogdf::energybased::dtree::GalaxyLevel::isFinestLevel | ( | ) | const |
returns true if this is the level of the original graph
GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::nextCoarser | ( | ) |
return the next coarser one
GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::nextFiner | ( | ) |
return the next finer one
returns the parent node of a node on the coarser level
|
private |
remove par edges with weight
void ogdf::energybased::dtree::GalaxyLevel::setEdgeWeight | ( | edge | e, |
double | weight | ||
) |
returns the edge weight of e
void ogdf::energybased::dtree::GalaxyLevel::setWeight | ( | node | v, |
double | weight | ||
) |
returns the weight of a node
double ogdf::energybased::dtree::GalaxyLevel::weight | ( | node | v | ) | const |
returns the weight of a node
|
private |
edge weight
Definition at line 113 of file GalaxyLevel.h.
|
private |
the weight of the node is the sum of weights of the children
Definition at line 107 of file GalaxyLevel.h.
pointer to the parent node on the coarser level
Definition at line 110 of file GalaxyLevel.h.
|
private |
the graph
Definition at line 104 of file GalaxyLevel.h.
|
private |
pointer to the next coarser
Definition at line 101 of file GalaxyLevel.h.
|
private |
pointer to the next finer level
Definition at line 98 of file GalaxyLevel.h.