Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
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
 

Protected Attributes

NodeArray< List< node > > childrenOfNode
 
NodeArray< intdescendantsOfNode
 
NodeArray< adjEntryedgeToParent
 
EdgeArray< boolinTree
 
NodeArray< intlevelOfNode
 
NodeArray< boolmark
 
NodeArray< nodeparentOfNode
 
GraphCopypGraph
 
node root
 

Detailed Description

Abstract BFSTree that is realized via NodeArrays.

Definition at line 123 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 131 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 170 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 168 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 166 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 151 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 155 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 162 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 164 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 153 of file PlanarSeparatorModule.h.

◆ init()

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

Initializes all internal arrays.

Definition at line 136 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 160 of file PlanarSeparatorModule.h.

Member Data Documentation

◆ childrenOfNode

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

Definition at line 214 of file PlanarSeparatorModule.h.

◆ descendantsOfNode

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

Definition at line 216 of file PlanarSeparatorModule.h.

◆ edgeToParent

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

Definition at line 215 of file PlanarSeparatorModule.h.

◆ inTree

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

Definition at line 218 of file PlanarSeparatorModule.h.

◆ levelOfNode

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

Definition at line 212 of file PlanarSeparatorModule.h.

◆ mark

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

Definition at line 217 of file PlanarSeparatorModule.h.

◆ parentOfNode

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

Definition at line 213 of file PlanarSeparatorModule.h.

◆ pGraph

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

Definition at line 209 of file PlanarSeparatorModule.h.

◆ root

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

Definition at line 210 of file PlanarSeparatorModule.h.


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