Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::planar_separators::ArrayBFSTree Class Reference

Abstract BFSTree that is realized via NodeArrays. More...

#include <ogdf/graphalg/PlanarSeparatorModule.h>

+ Inheritance diagram for ogdf::planar_separators::ArrayBFSTree:

Public Member Functions

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

Protected Attributes

NodeArray< List< node > > childrenOfNode
 
NodeArray< int > descendantsOfNode
 
NodeArray< adjEntryedgeToParent
 
EdgeArray< bool > inTree
 
NodeArray< int > levelOfNode
 
NodeArray< bool > mark
 
NodeArray< nodeparentOfNode
 
GraphCopypGraph
 
node root
 

Detailed Description

Abstract BFSTree that is realized via NodeArrays.

Definition at line 132 of file PlanarSeparatorModule.h.

Constructor & Destructor Documentation

◆ ArrayBFSTree()

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

Constructor.

Parameters
Gthe graph spanned by the tree
rootNodethe root node for the tree

Definition at line 140 of file PlanarSeparatorModule.h.

Member Function Documentation

◆ getAdjToParent()

adjEntry ogdf::planar_separators::ArrayBFSTree::getAdjToParent ( node  n) const
inlineoverridevirtual

Returns the adjEntry that leads up to the parent of n.

Parameters
nthe node
Returns
the adjEntry to parent

Implements ogdf::planar_separators::BFSTree.

Definition at line 179 of file PlanarSeparatorModule.h.

◆ getChildrenOfNode()

List<node> ogdf::planar_separators::ArrayBFSTree::getChildrenOfNode ( node  n) const
inlineoverridevirtual

Returns all (immediate) children of a node.

Parameters
nthe node
Returns
a list of all children of n

Implements ogdf::planar_separators::BFSTree.

Definition at line 177 of file PlanarSeparatorModule.h.

◆ getDescendantsOfNode()

int ogdf::planar_separators::ArrayBFSTree::getDescendantsOfNode ( node  n) const
inlineoverridevirtual

Returns the total number of children, grandchildren etc.

in the subtree rooted at n.

Parameters
nthe node
Returns
the total number of children

Implements ogdf::planar_separators::BFSTree.

Definition at line 175 of file PlanarSeparatorModule.h.

◆ getGraph()

GraphCopy* ogdf::planar_separators::ArrayBFSTree::getGraph ( ) const
inlineoverridevirtual

Allows access to a copy of the graph.

Returns
the GraphCopy

Implements ogdf::planar_separators::BFSTree.

Definition at line 160 of file PlanarSeparatorModule.h.

◆ getGraphSize()

int ogdf::planar_separators::ArrayBFSTree::getGraphSize ( ) const
inlineoverridevirtual

Gets the number of nodes of the graph.

Returns
the graph size

Implements ogdf::planar_separators::BFSTree.

Definition at line 164 of file PlanarSeparatorModule.h.

◆ getLevelOfNode()

int ogdf::planar_separators::ArrayBFSTree::getLevelOfNode ( node  n) const
inlineoverridevirtual

Returns the level (=depth in the tree) for a node.

Parameters
nthe node
Returns
the depth of n in the tree

Implements ogdf::planar_separators::BFSTree.

Definition at line 171 of file PlanarSeparatorModule.h.

◆ getParentOfNode()

node ogdf::planar_separators::ArrayBFSTree::getParentOfNode ( node  n) const
inlineoverridevirtual

Returns the node that is the parent of n in the tree.

Parameters
nthe child node
Returns
the parent node

Implements ogdf::planar_separators::BFSTree.

Definition at line 173 of file PlanarSeparatorModule.h.

◆ getRoot()

node ogdf::planar_separators::ArrayBFSTree::getRoot ( ) const
inlineoverridevirtual

Gets the current root node of the tree.

Returns
the root node

Implements ogdf::planar_separators::BFSTree.

Definition at line 162 of file PlanarSeparatorModule.h.

◆ init()

void ogdf::planar_separators::ArrayBFSTree::init ( )
inline

Initializes all internal arrays.

Definition at line 145 of file PlanarSeparatorModule.h.

◆ isInTree()

bool ogdf::planar_separators::ArrayBFSTree::isInTree ( edge  e) const
inlineoverridevirtual

Checks if an edge is a tree-edge.

Parameters
ethe edge to be checked
Returns
if the edge is in the tree

Implements ogdf::planar_separators::BFSTree.

Definition at line 169 of file PlanarSeparatorModule.h.

Member Data Documentation

◆ childrenOfNode

NodeArray<List<node> > ogdf::planar_separators::ArrayBFSTree::childrenOfNode
protected

Definition at line 223 of file PlanarSeparatorModule.h.

◆ descendantsOfNode

NodeArray<int> ogdf::planar_separators::ArrayBFSTree::descendantsOfNode
protected

Definition at line 225 of file PlanarSeparatorModule.h.

◆ edgeToParent

NodeArray<adjEntry> ogdf::planar_separators::ArrayBFSTree::edgeToParent
protected

Definition at line 224 of file PlanarSeparatorModule.h.

◆ inTree

EdgeArray<bool> ogdf::planar_separators::ArrayBFSTree::inTree
protected

Definition at line 227 of file PlanarSeparatorModule.h.

◆ levelOfNode

NodeArray<int> ogdf::planar_separators::ArrayBFSTree::levelOfNode
protected

Definition at line 221 of file PlanarSeparatorModule.h.

◆ mark

NodeArray<bool> ogdf::planar_separators::ArrayBFSTree::mark
protected

Definition at line 226 of file PlanarSeparatorModule.h.

◆ parentOfNode

NodeArray<node> ogdf::planar_separators::ArrayBFSTree::parentOfNode
protected

Definition at line 222 of file PlanarSeparatorModule.h.

◆ pGraph

GraphCopy* ogdf::planar_separators::ArrayBFSTree::pGraph
protected

Definition at line 218 of file PlanarSeparatorModule.h.

◆ root

node ogdf::planar_separators::ArrayBFSTree::root
protected

Definition at line 219 of file PlanarSeparatorModule.h.


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