Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::planar_separators::BFSTreeHP Class Reference

Specialised tree representation for Har-Peled. More...

#include <ogdf/graphalg/SeparatorHarPeled.h>

+ Inheritance diagram for ogdf::planar_separators::BFSTreeHP:

Public Member Functions

 BFSTreeHP (GraphCopy &G, node rootNode)
 Constructor.
 
void calculateDescendants ()
 Calculates the number of children of each node in the tree.
 
void construct ()
 Builds the tree by performing BFS search.
 
void reconstruct (const Cycle &cycle)
 Reconstructs the tree, rooting it at root of cycle.
 
- Public Member Functions inherited from ogdf::planar_separators::ArrayBFSTree
 ArrayBFSTree (GraphCopy &G, node rootNode)
 Constructor.
 
adjEntry getAdjToParent (node n) const override
 Returns the adjEntry that leads up to the parent of n.
 
List< nodegetChildrenOfNode (node n) const override
 Returns all (immediate) children of a node.
 
int getDescendantsOfNode (node n) const override
 Returns the total number of children, grandchildren etc.
 
GraphCopygetGraph () const override
 Allows access to a copy of the graph.
 
int getGraphSize () const override
 Gets the number of nodes of the graph.
 
int getLevelOfNode (node n) const override
 Returns the level (=depth in the tree) for a node.
 
node getParentOfNode (node n) const override
 Returns the node that is the parent of n in the tree.
 
node getRoot () const override
 Gets the current root node of the tree.
 
void init ()
 Initializes all internal arrays.
 
bool isInTree (edge e) const override
 Checks if an edge is a tree-edge.
 
- Public Member Functions inherited from ogdf::planar_separators::BFSTree
virtual ~BFSTree ()=default
 

Additional Inherited Members

- Protected Attributes inherited from ogdf::planar_separators::ArrayBFSTree
NodeArray< List< node > > childrenOfNode
 
NodeArray< intdescendantsOfNode
 
NodeArray< adjEntryedgeToParent
 
EdgeArray< boolinTree
 
NodeArray< intlevelOfNode
 
NodeArray< boolmark
 
NodeArray< nodeparentOfNode
 
GraphCopypGraph
 
node root
 

Detailed Description

Specialised tree representation for Har-Peled.

Once a 2/3-separator cycle has been found, his tree can be reconstructed so that it is rooted at the root of the separator.

Definition at line 46 of file SeparatorHarPeled.h.

Constructor & Destructor Documentation

◆ BFSTreeHP()

ogdf::planar_separators::BFSTreeHP::BFSTreeHP ( GraphCopy G,
node  rootNode 
)
inline

Constructor.

Parameters
Gthe GraphCopy generated by the separator that uses this tree
rootNodethe initial root for the tree (usually, a random node)

Definition at line 54 of file SeparatorHarPeled.h.

Member Function Documentation

◆ calculateDescendants()

void ogdf::planar_separators::BFSTreeHP::calculateDescendants ( )

Calculates the number of children of each node in the tree.

◆ construct()

void ogdf::planar_separators::BFSTreeHP::construct ( )

Builds the tree by performing BFS search.

◆ reconstruct()

void ogdf::planar_separators::BFSTreeHP::reconstruct ( const Cycle cycle)

Reconstructs the tree, rooting it at root of cycle.

Parameters
cyclethe cycle based on which we reconstruct.

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