TTK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ttk::DynTreeNode Struct Reference

class representing a node of a tree and the link to its parent if not the root More...

#include <DynamicTree.h>

Public Member Functions

bool hasParent () const
 
void evert ()
 Make this node the root of its tree.
 
DynTreeNodefindRoot () const
 Get representative node.
 
bool insertEdge (DynTreeNode *const n)
 
void removeEdge ()
 

Public Attributes

DynTreeNodeparent_ {nullptr}
 

Detailed Description

class representing a node of a tree and the link to its parent if not the root

Definition at line 25 of file DynamicTree.h.

Member Function Documentation

◆ evert()

void ttk::DynTreeNode::evert ( )

Make this node the root of its tree.

Definition at line 41 of file DynamicTree.cpp.

◆ findRoot()

ttk::DynTreeNode * ttk::DynTreeNode::findRoot ( ) const

Get representative node.

Definition at line 66 of file DynamicTree.cpp.

◆ hasParent()

bool ttk::DynTreeNode::hasParent ( ) const
inline

Definition at line 31 of file DynamicTree.h.

◆ insertEdge()

bool ttk::DynTreeNode::insertEdge ( DynTreeNode *const  n)

Create a new edge between this node and the node n

Returns
true if we have merged two tree, false if it was just an intern operation

Definition at line 74 of file DynamicTree.cpp.

◆ removeEdge()

void ttk::DynTreeNode::removeEdge ( )
inline

Remove the link between this node and its parent, thus making a new root

Definition at line 52 of file DynamicTree.h.

Member Data Documentation

◆ parent_

DynTreeNode* ttk::DynTreeNode::parent_ {nullptr}

Definition at line 26 of file DynamicTree.h.


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