Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::pc_tree::PCTreeForest Class Reference

Multiple PCTrees can be created within the same PCTreeForest, which allows merging the trees later on by making one a child of another. More...

#include <ogdf/basic/pctree/PCTreeForest.h>

Public Member Functions

 PCTreeForest (bool autodelete=true)
 
virtual ~PCTreeForest ()
 
void clear (void)
 Delete all trees created by makeTree(). More...
 
PCTreemakeTree (void)
 Create a new tree that may be automatically deleted when this forest is deleted. More...
 
 operator const PCTreeRegistry & () const
 

Private Attributes

bool m_autodelete
 
std::vector< PCNode * > m_cNodes
 
int m_nextNodeId = 0
 
PCTreeRegistry m_nodeArrayRegistry
 
ogdf::DisjointSets m_parents {1 << 8}
 
PCNodem_reusableNodes = nullptr
 
size_t m_timestamp = 0
 
std::vector< PCTree * > m_trees
 

Friends

class PCNode
 
class PCTree
 
class PCTreeRegistry
 

Detailed Description

Multiple PCTrees can be created within the same PCTreeForest, which allows merging the trees later on by making one a child of another.

This is extensively used during planarity testing.

See also
PCTree:insertTree()

Definition at line 53 of file PCTreeForest.h.

Constructor & Destructor Documentation

◆ PCTreeForest()

ogdf::pc_tree::PCTreeForest::PCTreeForest ( bool  autodelete = true)
inline
Parameters
autodeletewhether the trees created by makeTree() should be deleted automatically on destruction of this forrest. Note that this does not affect PCTrees directly created by calling PCTree::PCTree(PCTreeForest*).

Definition at line 77 of file PCTreeForest.h.

◆ ~PCTreeForest()

virtual ogdf::pc_tree::PCTreeForest::~PCTreeForest ( )
virtual

Member Function Documentation

◆ clear()

void ogdf::pc_tree::PCTreeForest::clear ( void  )

Delete all trees created by makeTree().

◆ makeTree()

PCTree* ogdf::pc_tree::PCTreeForest::makeTree ( void  )

Create a new tree that may be automatically deleted when this forest is deleted.

◆ operator const PCTreeRegistry &()

ogdf::pc_tree::PCTreeForest::operator const PCTreeRegistry & ( ) const
inline

Definition at line 87 of file PCTreeForest.h.

Friends And Related Function Documentation

◆ PCNode

friend class PCNode
friend

Definition at line 54 of file PCTreeForest.h.

◆ PCTree

friend class PCTree
friend

Definition at line 55 of file PCTreeForest.h.

◆ PCTreeRegistry

friend class PCTreeRegistry
friend

Definition at line 56 of file PCTreeForest.h.

Member Data Documentation

◆ m_autodelete

bool ogdf::pc_tree::PCTreeForest::m_autodelete
private

Definition at line 65 of file PCTreeForest.h.

◆ m_cNodes

std::vector<PCNode*> ogdf::pc_tree::PCTreeForest::m_cNodes
private

Definition at line 60 of file PCTreeForest.h.

◆ m_nextNodeId

int ogdf::pc_tree::PCTreeForest::m_nextNodeId = 0
private

Definition at line 62 of file PCTreeForest.h.

◆ m_nodeArrayRegistry

PCTreeRegistry ogdf::pc_tree::PCTreeForest::m_nodeArrayRegistry
private

Definition at line 64 of file PCTreeForest.h.

◆ m_parents

ogdf::DisjointSets ogdf::pc_tree::PCTreeForest::m_parents {1 << 8}
private

Definition at line 61 of file PCTreeForest.h.

◆ m_reusableNodes

PCNode* ogdf::pc_tree::PCTreeForest::m_reusableNodes = nullptr
private

Definition at line 68 of file PCTreeForest.h.

◆ m_timestamp

size_t ogdf::pc_tree::PCTreeForest::m_timestamp = 0
private

Definition at line 63 of file PCTreeForest.h.

◆ m_trees

std::vector<PCTree*> ogdf::pc_tree::PCTreeForest::m_trees
private

Definition at line 59 of file PCTreeForest.h.


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