Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::Bintree_visitor< Node_type, leaf_index_tag > Struct Template Reference

Detailed description

template<typename Node_type>
struct cugar::Bintree_visitor< Node_type, leaf_index_tag >

A binary tree visitor

#include <bintree_visitor.h>

Public Types

typedef Node_type node_type
 

Public Methods

 Bintree_visitor ()
 
void set_node_count (const uint32 num_nodes)
 
void set_leaf_count (const uint32 num_leaves)
 
void set_nodes (const node_type *nodes)
 
void set_parents (const uint32 *parents)
 
void set_skip_nodes (const uint32 *skip_nodes)
 
void set_leaf_pointers (const uint32 *leaf_pointers)
 
void set_leaf_ranges (const uint2 *leaf_ranges)
 
CUGAR_HOST_DEVICE uint32 get_node_count () const
 
CUGAR_HOST_DEVICE uint32 get_leaf_count () const
 
CUGAR_HOST_DEVICE uint32 get_child_count (const uint32 node) const
 
CUGAR_HOST_DEVICE bool is_leaf (const uint32 node) const
 
CUGAR_HOST_DEVICE uint32 get_child (const uint32 node, const uint32 i) const
 
CUGAR_HOST_DEVICE uint32 get_parent (const uint32 node) const
 
CUGAR_HOST_DEVICE uint32 get_skip_node (const uint32 node) const
 
CUGAR_HOST_DEVICE uint2 get_leaf_range (const uint32 node) const
 
CUGAR_HOST_DEVICE uint32 get_range_size (const uint32 node) const
 
CUGAR_HOST_DEVICE bool has_leaf_pointers () const
 
CUGAR_HOST_DEVICE uint32 get_leaf_node (const uint32 i) const
 

Public Members

uint32 m_num_nodes
 
uint32 m_num_leaves
 
const node_type * m_nodes
 
const uint32 * m_node_sizes
 
const uint32 * m_leaf_pointers
 
const uint2 * m_leaf_ranges
 
const uint32 * m_parents
 
const uint32 * m_skip_nodes
 

Constructor & Destructor Documentation

◆ Bintree_visitor()

template<typename Node_type >
cugar::Bintree_visitor< Node_type, leaf_index_tag >::Bintree_visitor ( )
inline

constructor

Member Function Documentation

◆ get_child()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_child ( const uint32  node,
const uint32  i 
) const
inline

get i-th child (among the active ones)

Parameters
nodenode index
ichild index

◆ get_child_count()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_child_count ( const uint32  node) const
inline

get child count

Parameters
nodenode index

◆ get_leaf_count()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_leaf_count ( ) const
inline

get leaf count

◆ get_leaf_node()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_leaf_node ( const uint32  i) const
inline

return the index of the i-th leaf node

◆ get_leaf_range()

template<typename Node_type >
CUGAR_HOST_DEVICE uint2 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_leaf_range ( const uint32  node) const
inline

get leaf range

Parameters
nodenode index

◆ get_node_count()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_node_count ( ) const
inline

get node count

◆ get_parent()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_parent ( const uint32  node) const
inline

get parent

Parameters
nodenode index

◆ get_range_size()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_range_size ( const uint32  node) const
inline

get primitive range size

Parameters
nodenode index

◆ get_skip_node()

template<typename Node_type >
CUGAR_HOST_DEVICE uint32 cugar::Bintree_visitor< Node_type, leaf_index_tag >::get_skip_node ( const uint32  node) const
inline

get skip node

Parameters
nodenode index

◆ has_leaf_pointers()

template<typename Node_type >
CUGAR_HOST_DEVICE bool cugar::Bintree_visitor< Node_type, leaf_index_tag >::has_leaf_pointers ( ) const
inline

return whether it's possible to locate leaf nodes

◆ is_leaf()

template<typename Node_type >
CUGAR_HOST_DEVICE bool cugar::Bintree_visitor< Node_type, leaf_index_tag >::is_leaf ( const uint32  node) const
inline

return whether the node is a leaf

Parameters
nodenode index

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