Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
shamtree::KarrasTreeTraverserAccessed Struct Reference

Public Member Functions

u32 get_left_child (u32 id) const
 Retrieves the left child node identifier for a given node ID.
 
u32 get_right_child (u32 id) const
 Retrieves the right child node identifier for a given node ID.
 
bool is_id_leaf (u32 id) const
 is the given id a leaf (Note that if there is no internal cell every node is a leaf)
 
template<u32 tree_depth, class Functor1 , class Functor2 , class Functor3 >
void stack_based_traversal (u32 root_node, Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const
 stack based tree traversal
 
template<u32 tree_depth, class Functor1 , class Functor2 , class Functor3 >
void stack_based_traversal (Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const
 stack based tree traversal
 

Public Attributes

const u32lchild_id
 
const u32rchild_id
 
const u8lchild_flag
 
const u8rchild_flag
 
u32 offset_leaf
 

Detailed Description

Definition at line 39 of file KarrasTreeTraverser.hpp.

Member Function Documentation

◆ get_left_child()

u32 shamtree::KarrasTreeTraverserAccessed::get_left_child ( u32  id) const
inline

Retrieves the left child node identifier for a given node ID.

Parameters
idThe identifier of the node for which to find the left child.
Returns
The ID of the left child node, adjusted by the offset if the node is a leaf.

Definition at line 52 of file KarrasTreeTraverser.hpp.

◆ get_right_child()

u32 shamtree::KarrasTreeTraverserAccessed::get_right_child ( u32  id) const
inline

Retrieves the right child node identifier for a given node ID.

Parameters
idThe identifier of the node for which to find the right child.
Returns
The ID of the right child node, adjusted by the offset if the node is a leaf.

Definition at line 62 of file KarrasTreeTraverser.hpp.

◆ is_id_leaf()

bool shamtree::KarrasTreeTraverserAccessed::is_id_leaf ( u32  id) const
inline

is the given id a leaf (Note that if there is no internal cell every node is a leaf)

Definition at line 67 of file KarrasTreeTraverser.hpp.

◆ stack_based_traversal() [1/2]

template<u32 tree_depth, class Functor1 , class Functor2 , class Functor3 >
void shamtree::KarrasTreeTraverserAccessed::stack_based_traversal ( Functor1 &&  traverse_condition,
Functor2 &&  on_found_leaf,
Functor3 &&  on_excluded_node 
) const
inline

stack based tree traversal

Definition at line 122 of file KarrasTreeTraverser.hpp.

◆ stack_based_traversal() [2/2]

template<u32 tree_depth, class Functor1 , class Functor2 , class Functor3 >
void shamtree::KarrasTreeTraverserAccessed::stack_based_traversal ( u32  root_node,
Functor1 &&  traverse_condition,
Functor2 &&  on_found_leaf,
Functor3 &&  on_excluded_node 
) const
inline

stack based tree traversal

Definition at line 71 of file KarrasTreeTraverser.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ lchild_flag

const u8* shamtree::KarrasTreeTraverserAccessed::lchild_flag

Definition at line 42 of file KarrasTreeTraverser.hpp.

◆ lchild_id

const u32* shamtree::KarrasTreeTraverserAccessed::lchild_id

Definition at line 40 of file KarrasTreeTraverser.hpp.

◆ offset_leaf

u32 shamtree::KarrasTreeTraverserAccessed::offset_leaf

Definition at line 44 of file KarrasTreeTraverser.hpp.

◆ rchild_flag

const u8* shamtree::KarrasTreeTraverserAccessed::rchild_flag

Definition at line 43 of file KarrasTreeTraverser.hpp.

◆ rchild_id

const u32* shamtree::KarrasTreeTraverserAccessed::rchild_id

Definition at line 41 of file KarrasTreeTraverser.hpp.


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