Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
lvr2::LBKdTree Class Reference

The LBKdTree class implements a left-balanced array-based index kd-tree. Left-Balanced: minimum memory Array-Based: Good for GPU - Usage. More...

#include <LBKdTree.hpp>

Public Member Functions

void generateKdTree (LBPointArray< float > &vertices)
 
boost::shared_ptr< LBPointArray< unsigned char > > getKdTreeSplits ()
 
boost::shared_ptr< LBPointArray< float > > getKdTreeValues ()
 
 LBKdTree (LBPointArray< float > &vertices, int num_threads=8)
 Public. More...
 
 ~LBKdTree ()
 

Private Member Functions

void generateKdTreeArray (LBPointArray< float > &V, LBPointArray< unsigned int > *sorted_indices, int max_dim)
 Private. More...
 

Static Private Member Functions

static void fillCriticalIndices (const LBPointArray< float > &V, LBPointArray< unsigned int > &sorted_indices, unsigned int current_dim, float split_value, unsigned int split_index, std::list< unsigned int > &critical_indices_left, std::list< unsigned int > &critical_indices_right)
 
static void fillCriticalIndicesSet (const LBPointArray< float > &V, LBPointArray< unsigned int > &sorted_indices, unsigned int current_dim, float split_value, unsigned int split_index, std::unordered_set< unsigned int > &critical_indices_left, std::unordered_set< unsigned int > &critical_indices_right)
 
static void generateKdTreeRecursive (int id, LBPointArray< float > &V, LBPointArray< unsigned int > *sorted_indices, int current_dim, int max_dim, LBPointArray< float > *values, LBPointArray< unsigned char > *splits, int size, int max_tree_depth, int position, int current_depth)
 
static void test (int id, LBPointArray< float > *sorted_indices)
 

Private Attributes

boost::shared_ptr< LBPointArray< unsigned char > > m_splits
 
boost::shared_ptr< LBPointArray< float > > m_values
 

Static Private Attributes

static ctpl::thread_poolpool
 
static int st_depth_threads = 3
 
static int st_num_threads = 8
 

Detailed Description

The LBKdTree class implements a left-balanced array-based index kd-tree. Left-Balanced: minimum memory Array-Based: Good for GPU - Usage.

Definition at line 51 of file LBKdTree.hpp.

Constructor & Destructor Documentation

◆ LBKdTree()

lvr2::LBKdTree::LBKdTree ( LBPointArray< float > &  vertices,
int  num_threads = 8 
)

Public.

Definition at line 45 of file LBKdTree.cpp.

◆ ~LBKdTree()

lvr2::LBKdTree::~LBKdTree ( )

Definition at line 54 of file LBKdTree.cpp.

Member Function Documentation

◆ fillCriticalIndices()

void lvr2::LBKdTree::fillCriticalIndices ( const LBPointArray< float > &  V,
LBPointArray< unsigned int > &  sorted_indices,
unsigned int  current_dim,
float  split_value,
unsigned int  split_index,
std::list< unsigned int > &  critical_indices_left,
std::list< unsigned int > &  critical_indices_right 
)
staticprivate

Definition at line 154 of file LBKdTree.cpp.

◆ fillCriticalIndicesSet()

void lvr2::LBKdTree::fillCriticalIndicesSet ( const LBPointArray< float > &  V,
LBPointArray< unsigned int > &  sorted_indices,
unsigned int  current_dim,
float  split_value,
unsigned int  split_index,
std::unordered_set< unsigned int > &  critical_indices_left,
std::unordered_set< unsigned int > &  critical_indices_right 
)
staticprivate

Definition at line 183 of file LBKdTree.cpp.

◆ generateKdTree()

void lvr2::LBKdTree::generateKdTree ( LBPointArray< float > &  vertices)

Definition at line 61 of file LBKdTree.cpp.

◆ generateKdTreeArray()

void lvr2::LBKdTree::generateKdTreeArray ( LBPointArray< float > &  V,
LBPointArray< unsigned int > *  sorted_indices,
int  max_dim 
)
private

Private.

Definition at line 97 of file LBKdTree.cpp.

◆ generateKdTreeRecursive()

void lvr2::LBKdTree::generateKdTreeRecursive ( int  id,
LBPointArray< float > &  V,
LBPointArray< unsigned int > *  sorted_indices,
int  current_dim,
int  max_dim,
LBPointArray< float > *  values,
LBPointArray< unsigned char > *  splits,
int  size,
int  max_tree_depth,
int  position,
int  current_depth 
)
staticprivate

split sorted_indices

Definition at line 213 of file LBKdTree.cpp.

◆ getKdTreeSplits()

boost::shared_ptr< LBPointArray< unsigned char > > lvr2::LBKdTree::getKdTreeSplits ( )

Definition at line 91 of file LBKdTree.cpp.

◆ getKdTreeValues()

boost::shared_ptr< LBPointArray< float > > lvr2::LBKdTree::getKdTreeValues ( )

Definition at line 87 of file LBKdTree.cpp.

◆ test()

static void lvr2::LBKdTree::test ( int  id,
LBPointArray< float > *  sorted_indices 
)
staticprivate

Member Data Documentation

◆ m_splits

boost::shared_ptr<LBPointArray<unsigned char> > lvr2::LBKdTree::m_splits
private

Definition at line 73 of file LBKdTree.hpp.

◆ m_values

boost::shared_ptr<LBPointArray<float> > lvr2::LBKdTree::m_values
private

Definition at line 70 of file LBKdTree.hpp.

◆ pool

ctpl::thread_pool * lvr2::LBKdTree::pool
staticprivate

Definition at line 80 of file LBKdTree.hpp.

◆ st_depth_threads

int lvr2::LBKdTree::st_depth_threads = 3
staticprivate

Definition at line 78 of file LBKdTree.hpp.

◆ st_num_threads

int lvr2::LBKdTree::st_num_threads = 8
staticprivate

Definition at line 77 of file LBKdTree.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27