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 | |
~GalaxyLevel () | |
destructor, deletes this level and all subsequent i.e coarser ones | |
GalaxyLevel * | buildLevelsUntil (int maxNumNodes) |
Builds all levels until the graph has less than maxNumNodes . | |
double | edgeWeight (edge e) const |
returns the edge weight of e | |
const Graph & | graph () const |
returns the graph | |
bool | isCoarsestLevel () const |
returns true if this is the coarsest level | |
bool | isFinestLevel () const |
returns true if this is the level of the original graph | |
GalaxyLevel * | nextCoarser () |
return the next coarser one | |
GalaxyLevel * | nextFiner () |
return the next finer one | |
node | parent (node v) const |
returns the parent node of a node on the coarser level | |
void | setEdgeWeight (edge e, double weight) |
returns the edge weight of e | |
void | setWeight (node v, double weight) |
returns the weight of a node | |
double | weight (node v) const |
returns the weight of a node | |
Private Member Functions | |
GalaxyLevel (GalaxyLevel *pNextFiner) | |
private constructor for creating a coarser level | |
GalaxyLevel * | buildNextCoarserLevel (int numLabels=3) |
creates a new coarser version of this graph | |
void | removeParEdgesWithWeight () |
remove par edges with weight | |
Private Attributes | |
EdgeArray< double > | m_edgeWeight |
edge weight | |
NodeArray< double > | m_nodeWeight |
the weight of the node is the sum of weights of the children | |
NodeArray< node > | m_parent |
pointer to the parent node on the coarser level | |
Graph * | m_pGraph |
the graph | |
GalaxyLevel * | m_pNextCoarser |
pointer to the next coarser | |
GalaxyLevel * | m_pNextFiner |
pointer to the next finer level | |
Simple implementation of the slightly modified version of Hachul by Gronemann.
Definition at line 38 of file GalaxyLevel.h.
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
returns the edge weight of e
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
returns the edge weight of e
returns the weight of a node
edge weight
Definition at line 112 of file GalaxyLevel.h.
the weight of the node is the sum of weights of the children
Definition at line 106 of file GalaxyLevel.h.
pointer to the parent node on the coarser level
Definition at line 109 of file GalaxyLevel.h.
|
private |
the graph
Definition at line 103 of file GalaxyLevel.h.
|
private |
pointer to the next coarser
Definition at line 100 of file GalaxyLevel.h.
|
private |
pointer to the next finer level
Definition at line 97 of file GalaxyLevel.h.