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 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.