Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
 
 ~GalaxyLevel ()
 destructor, deletes this level and all subsequent i.e coarser ones
 
GalaxyLevelbuildLevelsUntil (int maxNumNodes)
 Builds all levels until the graph has less than maxNumNodes.
 
double edgeWeight (edge e) const
 returns the edge weight of e
 
const Graphgraph () 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
 
GalaxyLevelnextCoarser ()
 return the next coarser one
 
GalaxyLevelnextFiner ()
 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
 
GalaxyLevelbuildNextCoarserLevel (int numLabels=3)
 creates a new coarser version of this graph
 
void removeParEdgesWithWeight ()
 remove par edges with weight
 

Private Attributes

EdgeArray< doublem_edgeWeight
 edge weight
 
NodeArray< doublem_nodeWeight
 the weight of the node is the sum of weights of the children
 
NodeArray< nodem_parent
 pointer to the parent node on the coarser level
 
Graphm_pGraph
 the graph
 
GalaxyLevelm_pNextCoarser
 pointer to the next coarser
 
GalaxyLevelm_pNextFiner
 pointer to the next finer level
 

Detailed Description

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

Definition at line 38 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 112 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 106 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 109 of file GalaxyLevel.h.

◆ m_pGraph

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

the graph

Definition at line 103 of file GalaxyLevel.h.

◆ m_pNextCoarser

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

pointer to the next coarser

Definition at line 100 of file GalaxyLevel.h.

◆ m_pNextFiner

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

pointer to the next finer level

Definition at line 97 of file GalaxyLevel.h.


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