Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::energybased::dtree::GalaxyLevel Class Reference

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...
 
GalaxyLevelbuildLevelsUntil (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 Graphgraph () 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...
 
GalaxyLevelnextCoarser ()
 return the next coarser one More...
 
GalaxyLevelnextFiner ()
 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...
 
GalaxyLevelbuildNextCoarserLevel (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< nodem_parent
 pointer to the parent node on the coarser level More...
 
Graphm_pGraph
 the graph More...
 
GalaxyLevelm_pNextCoarser
 pointer to the next coarser More...
 
GalaxyLevelm_pNextFiner
 pointer to the next finer level More...
 

Detailed Description

Simple implementation of the slightly modified version of Hachul by Gronemann.

Definition at line 39 of file GalaxyLevel.h.

Constructor & Destructor Documentation

◆ GalaxyLevel() [1/2]

ogdf::energybased::dtree::GalaxyLevel::GalaxyLevel ( const Graph graph)
explicit

constructor for the finest level i.e. the original graph

Precondition
the graph has to be connected

◆ ~GalaxyLevel()

ogdf::energybased::dtree::GalaxyLevel::~GalaxyLevel ( )

destructor, deletes this level and all subsequent i.e coarser ones

◆ GalaxyLevel() [2/2]

ogdf::energybased::dtree::GalaxyLevel::GalaxyLevel ( GalaxyLevel pNextFiner)
private

private constructor for creating a coarser level

Member Function Documentation

◆ buildLevelsUntil()

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.

◆ buildNextCoarserLevel()

GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::buildNextCoarserLevel ( int  numLabels = 3)
private

creates a new coarser version of this graph

◆ edgeWeight()

double ogdf::energybased::dtree::GalaxyLevel::edgeWeight ( edge  e) const

returns the edge weight of e

◆ graph()

const Graph& ogdf::energybased::dtree::GalaxyLevel::graph ( ) const

returns the graph

◆ isCoarsestLevel()

bool ogdf::energybased::dtree::GalaxyLevel::isCoarsestLevel ( ) const

returns true if this is the coarsest level

◆ isFinestLevel()

bool ogdf::energybased::dtree::GalaxyLevel::isFinestLevel ( ) const

returns true if this is the level of the original graph

◆ nextCoarser()

GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::nextCoarser ( )

return the next coarser one

◆ nextFiner()

GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::nextFiner ( )

return the next finer one

◆ parent()

node ogdf::energybased::dtree::GalaxyLevel::parent ( node  v) const

returns the parent node of a node on the coarser level

◆ removeParEdgesWithWeight()

void ogdf::energybased::dtree::GalaxyLevel::removeParEdgesWithWeight ( )
private

remove par edges with weight

◆ setEdgeWeight()

void ogdf::energybased::dtree::GalaxyLevel::setEdgeWeight ( edge  e,
double  weight 
)

returns the edge weight of e

◆ setWeight()

void ogdf::energybased::dtree::GalaxyLevel::setWeight ( node  v,
double  weight 
)

returns the weight of a node

◆ weight()

double ogdf::energybased::dtree::GalaxyLevel::weight ( node  v) const

returns the weight of a node

Member Data Documentation

◆ m_edgeWeight

EdgeArray<double> ogdf::energybased::dtree::GalaxyLevel::m_edgeWeight
private

edge weight

Definition at line 113 of file GalaxyLevel.h.

◆ m_nodeWeight

NodeArray<double> ogdf::energybased::dtree::GalaxyLevel::m_nodeWeight
private

the weight of the node is the sum of weights of the children

Definition at line 107 of file GalaxyLevel.h.

◆ m_parent

NodeArray<node> ogdf::energybased::dtree::GalaxyLevel::m_parent
private

pointer to the parent node on the coarser level

Definition at line 110 of file GalaxyLevel.h.

◆ m_pGraph

Graph* ogdf::energybased::dtree::GalaxyLevel::m_pGraph
private

the graph

Definition at line 104 of file GalaxyLevel.h.

◆ m_pNextCoarser

GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::m_pNextCoarser
private

pointer to the next coarser

Definition at line 101 of file GalaxyLevel.h.

◆ m_pNextFiner

GalaxyLevel* ogdf::energybased::dtree::GalaxyLevel::m_pNextFiner
private

pointer to the next finer level

Definition at line 98 of file GalaxyLevel.h.


The documentation for this class was generated from the following file: