Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::FourBlockTree Struct Reference

A node in a 4-block tree. More...

#include <ogdf/decomposition/FourBlockTree.h>

Public Member Functions

 FourBlockTree ()=default
 
 FourBlockTree (const FourBlockTree &)=delete
 
 FourBlockTree (FourBlockTree &&)=delete
 
 ~FourBlockTree ()
 
FourBlockTreeoperator= (const FourBlockTree &)=delete
 
FourBlockTreeoperator= (FourBlockTree &&)=delete
 
template<typename _F >
void postorder (_F callback)
 Perform a post-order traversal of the 4-block tree. More...
 
template<typename _F >
void postorder (_F callback) const
 Perform a post-order traversal of the 4-block tree. More...
 
template<typename _F >
void preorder (_F callback)
 Perform a pre-order traversal of the 4-block tree. More...
 
template<typename _F >
void preorder (_F callback) const
 Perform a pre-order traversal of the 4-block tree. More...
 

Static Public Member Functions

static std::unique_ptr< FourBlockTreeconstruct (const Graph &g, adjEntry externalFace)
 Construct a 4-block tree of the given graph. More...
 

Public Attributes

std::vector< std::unique_ptr< FourBlockTree > > children
 The child nodes of this nodes. More...
 
adjEntry externalFace
 A half-edge in g such that the external face of g is to its right. More...
 
std::unique_ptr< Graphg = std::make_unique<Graph>()
 The 4-connected component. More...
 
NodeArray< nodeoriginalNodes
 The nodes in the original graph corresponding to the nodes in g. More...
 
FourBlockTreeparent
 The parent node of this node in the 4-block tree. More...
 
adjEntry parentFace
 The half-edge in parent->g corresponding to externalFace. More...
 

Detailed Description

A node in a 4-block tree.

Since each node contains its children, the root is the entire tree.

Definition at line 59 of file FourBlockTree.h.

Constructor & Destructor Documentation

◆ FourBlockTree() [1/3]

ogdf::FourBlockTree::FourBlockTree ( )
default

◆ FourBlockTree() [2/3]

ogdf::FourBlockTree::FourBlockTree ( const FourBlockTree )
delete

◆ FourBlockTree() [3/3]

ogdf::FourBlockTree::FourBlockTree ( FourBlockTree &&  )
delete

◆ ~FourBlockTree()

ogdf::FourBlockTree::~FourBlockTree ( )
inline

Definition at line 66 of file FourBlockTree.h.

Member Function Documentation

◆ construct()

static std::unique_ptr<FourBlockTree> ogdf::FourBlockTree::construct ( const Graph g,
adjEntry  externalFace 
)
static

Construct a 4-block tree of the given graph.

Parameters
gThe plane triangulated graph whose 4-block tree shall be constructed. This graph will be used destructively. Edge directions in g are not respected. The order of edges at each node is used as the combinatorial embedding.
externalFaceA half-edge in g such that the external face of g lies to its right.

◆ operator=() [1/2]

FourBlockTree& ogdf::FourBlockTree::operator= ( const FourBlockTree )
delete

◆ operator=() [2/2]

FourBlockTree& ogdf::FourBlockTree::operator= ( FourBlockTree &&  )
delete

◆ postorder() [1/2]

template<typename _F >
void ogdf::FourBlockTree::postorder ( _F  callback)
inline

Perform a post-order traversal of the 4-block tree.

Each child is processed before its parent.

Template Parameters
_FThe type of callback, something like void (*)(FourBlockTree&).
Parameters
callbackThe function to be called for each node of the tree.

Definition at line 226 of file FourBlockTree.h.

◆ postorder() [2/2]

template<typename _F >
void ogdf::FourBlockTree::postorder ( _F  callback) const
inline

Perform a post-order traversal of the 4-block tree.

Each child is processed before its parent.

Template Parameters
_FThe type of callback, something like void (*)(const FourBlockTree&).
Parameters
callbackThe function to be called for each node of the tree.

Definition at line 195 of file FourBlockTree.h.

◆ preorder() [1/2]

template<typename _F >
void ogdf::FourBlockTree::preorder ( _F  callback)
inline

Perform a pre-order traversal of the 4-block tree.

Each child is processed after its parent.

Template Parameters
_FThe type of callback, something like void (*)(FourBlockTree&).
Parameters
callbackThe function to be called for each node of the tree.

Definition at line 163 of file FourBlockTree.h.

◆ preorder() [2/2]

template<typename _F >
void ogdf::FourBlockTree::preorder ( _F  callback) const
inline

Perform a pre-order traversal of the 4-block tree.

Each child is processed after its parent.

Template Parameters
_FThe type of callback, something like void (*)(const FourBlockTree&).
Parameters
callbackThe function to be called for each node of the tree.

Definition at line 131 of file FourBlockTree.h.

Member Data Documentation

◆ children

std::vector<std::unique_ptr<FourBlockTree> > ogdf::FourBlockTree::children

The child nodes of this nodes.

Definition at line 106 of file FourBlockTree.h.

◆ externalFace

adjEntry ogdf::FourBlockTree::externalFace

A half-edge in g such that the external face of g is to its right.

Definition at line 87 of file FourBlockTree.h.

◆ g

std::unique_ptr<Graph> ogdf::FourBlockTree::g = std::make_unique<Graph>()

The 4-connected component.

Definition at line 74 of file FourBlockTree.h.

◆ originalNodes

NodeArray<node> ogdf::FourBlockTree::originalNodes

The nodes in the original graph corresponding to the nodes in g.

Since nodes may appear in multiple 4-connected components, these need not be unique across nodes of the 4-block tree.

Definition at line 82 of file FourBlockTree.h.

◆ parent

FourBlockTree* ogdf::FourBlockTree::parent

The parent node of this node in the 4-block tree.

If this node is the root node, parent is nullptr.

Definition at line 94 of file FourBlockTree.h.

◆ parentFace

adjEntry ogdf::FourBlockTree::parentFace

The half-edge in parent->g corresponding to externalFace.

If this node is the root node, parentFace is nullptr.

Definition at line 101 of file FourBlockTree.h.


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