API Documentation
Loading...
Searching...
No Matches
KDTreeBase< t_dims, t_type > Class Template Reference

#include <KDTree.hpp>

Inheritance diagram for KDTreeBase< t_dims, t_type >:
[legend]
Collaboration diagram for KDTreeBase< t_dims, t_type >:
[legend]

Public Member Functions

 KDTreeBase (uint04 bucket_size)
 
 KDTreeBase (const KDTreeBase< t_dims, t_type > &tree)
 
 KDTreeBase (KDTreeBase< t_dims, t_type > &&tree)
 
template<class t_node_type >
bool validate (const Buffer< t_node_type > &elements)
 
- Public Member Functions inherited from TreeBase< KDNode< t_dims, t_type >, t_type, 2 >
uint04 getIndex (uint04 index) const
 
void clear ()
 
uint04 getNumberOfNodes () const
 
const KDNode< t_dims, t_type > & getNode (uint04 node_id) const
 
void removeIndices (const Buffer< bool > &deletion_indices)
 
void removeIndices (uint04 begin, uint04 end)
 
void addIndices (const Buffer< bool > &insertion_indices)
 
void addIndices (uint04 begin, uint04 end)
 
uint04 size () const
 
void removeIndex (uint04 index) const
 
Bounds< t_dims, t_type > _getBounds (const Buffer< uint04 > &indices, const t_buffer_type &elements, uint04 start, uint04 end)
 
void addIndex (uint04 index) const
 
const Buffer< uint04 > & indices () const
 
void sortVertices (const t_buffer_type &elements, t_buffer_type &sorted) const
 
TreeBaseoperator= (const TreeBase &value)
 
TreeBaseoperator= (TreeBase &&value)
 
uint04 indexSize () const
 
uint04 nodeSize () const
 

Protected Member Functions

 KDTreeBase (const Buffer< KDNode< t_dims, t_type > > &nodes, const Buffer< uint04 > &indices, bool is_read_only)
 
template<class t_node_type , class t_buffer_type >
uint04 _calculateAndSplit (uint04 node_index, Bounds< t_dims, t_type > node_bounds, const t_buffer_type &elements, Buffer< uint04 > &indices, uint04 start, uint04 end, bool is_precise)
 
template<class t_node_type , class t_buffer_type >
bool _balanceLeafNode (uint04 top_index, const t_buffer_type &elements, Buffer< uint04 > &indices, uint04 top_start, uint04 top_end, bool is_precise, ProgressInfo *progress=nullptr)
 
template<class t_node_type , class t_buffer_type >
bool _getClosestElement (uint04 top_index, const Vector< t_dims, t_type > &point, const t_buffer_type &elements, t_type &min_distance, const t_type epsilon, uint04 &min_index) const
 
template<class t_node_type , class t_buffer_type >
void _getClosestElements (uint04 top_index, const Vector< t_dims, t_type > &point, const t_buffer_type &elements, t_type &min_distance, const t_type &epsilon, MinHeap< t_type, uint04 > &heap, uint04 size) const
 
template<class t_node_type , class t_buffer_type >
bool _getClosestElement (uint04 top_index, const LineSegment< t_dims, t_type > &top_line, const t_buffer_type &elements, t_type &min_distance, t_type epsilon, uint04 &min_index) const
 
template<class t_node_type , class t_buffer_type >
bool _getClosestElement (uint04 top_index, const Triangle< t_dims, t_type > &triangle, const t_buffer_type &elements, t_type &min_distance, t_type epsilon, uint04 &min_index) const
 
template<class t_node_type , class t_area_type , class t_buffer_type >
void _getEnclosedElements (uint04 top_node, t_area_type area, Buffer< bool > &indices, const t_buffer_type &elements) const
 
template<class t_area_type , class t_node_type , class t_buffer_type >
uint04 _getNumberOfEnclosedElements (uint04 top_node, const t_area_type &area, const t_buffer_type &elements) const
 
template<class t_node_type , class t_buffer_type >
void _removeValue (uint04 top_node, uint04 index, const t_buffer_type &elements)
 
template<class t_node_type , class t_buffer_type >
void _moveValue (uint04 top_node, uint04 index, const t_node_type &new_location, const t_buffer_type &elements)
 
bool needsRebalance (uint04 left_size, uint04 right_size)
 
bool useBulkResize (uint04 change_size)
 
template<class t_node_type , class t_buffer_type >
void _addValues (uint04 top_node, Buffer< uint04 > indices, const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
template<class t_node_type , class t_buffer_type >
void _addValue (uint04 node_index, uint04 index, const t_buffer_type &elements)
 
template<class t_node_type , class t_buffer_type >
bool recalculateBounds (uint04 node_index, const t_buffer_type &elements)
 
void _makeWriteable ()
 
- Protected Member Functions inherited from TreeBase< KDNode< t_dims, t_type >, t_type, 2 >
 TreeBase (uint04 bucket_size)
 
 TreeBase (const TreeBase &tree)
 
 TreeBase (TreeBase &&tree)
 
 TreeBase (const Buffer< KDNode< t_dims, t_type > > &nodes, const Buffer< uint04 > &indices, bool is_read_only)
 
virtual ~TreeBase ()
 
Buffer< uint04prepareAddAll (const Buffer< bool > &index_values)
 
Buffer< uint04prepareAddAll (uint04 start_index, uint04 end_index, const t_buffer_type &elements)
 
uint04 getNumberOfFreeIndices ()
 
uint04 getNumberOfFreeNodes ()
 
void splitLeafNode (uint04 index)
 
void reclaimChildren (uint04 index)
 
void _getAllT (const uint04 &node_index, Buffer< bool > &indices) const
 
void _getAll (const uint04 &node_index, Buffer< uint04 > &indices) const
 

Additional Inherited Members

- Protected Attributes inherited from TreeBase< KDNode< t_dims, t_type >, t_type, 2 >
Buffer< uint04m_indices
 
Buffer< KDNode< t_dims, t_type >, uint04, ObjectAllocator< true > > m_nodes
 
Buffer< uint04m_available_node_positions
 
Buffer< uint04m_available_indexed_positions
 
uint04 m_bucket_size
 
- Static Protected Attributes inherited from TreeBase< KDNode< t_dims, t_type >, t_type, 2 >
static const uint04 root_node
 

Constructor & Destructor Documentation

◆ KDTreeBase() [1/4]

template<uint01 t_dims, class t_type >
KDTreeBase ( uint04 bucket_size)
inlineexplicit

◆ KDTreeBase() [2/4]

template<uint01 t_dims, class t_type >
KDTreeBase ( const KDTreeBase< t_dims, t_type > & tree)
inline

◆ KDTreeBase() [3/4]

template<uint01 t_dims, class t_type >
KDTreeBase ( KDTreeBase< t_dims, t_type > && tree)
inline

◆ KDTreeBase() [4/4]

template<uint01 t_dims, class t_type >
KDTreeBase ( const Buffer< KDNode< t_dims, t_type > > & nodes,
const Buffer< uint04 > & indices,
bool is_read_only )
inlineprotected

Member Function Documentation

◆ _addValue()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
void _addValue ( uint04 node_index,
uint04 index,
const t_buffer_type & elements )
inlineprotected

◆ _addValues()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
void _addValues ( uint04 top_node,
Buffer< uint04 > indices,
const t_buffer_type & elements,
bool is_precise,
ProgressInfo * progress = nullptr )
inlineprotected

◆ _balanceLeafNode()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
bool _balanceLeafNode ( uint04 top_index,
const t_buffer_type & elements,
Buffer< uint04 > & indices,
uint04 top_start,
uint04 top_end,
bool is_precise,
ProgressInfo * progress = nullptr )
inlineprotected

◆ _calculateAndSplit()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
uint04 _calculateAndSplit ( uint04 node_index,
Bounds< t_dims, t_type > node_bounds,
const t_buffer_type & elements,
Buffer< uint04 > & indices,
uint04 start,
uint04 end,
bool is_precise )
inlineprotected

◆ _getClosestElement() [1/3]

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
bool _getClosestElement ( uint04 top_index,
const LineSegment< t_dims, t_type > & top_line,
const t_buffer_type & elements,
t_type & min_distance,
t_type epsilon,
uint04 & min_index ) const
inlineprotected

◆ _getClosestElement() [2/3]

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
bool _getClosestElement ( uint04 top_index,
const Triangle< t_dims, t_type > & triangle,
const t_buffer_type & elements,
t_type & min_distance,
t_type epsilon,
uint04 & min_index ) const
inlineprotected

◆ _getClosestElement() [3/3]

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
bool _getClosestElement ( uint04 top_index,
const Vector< t_dims, t_type > & point,
const t_buffer_type & elements,
t_type & min_distance,
const t_type epsilon,
uint04 & min_index ) const
inlineprotected

◆ _getClosestElements()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
void _getClosestElements ( uint04 top_index,
const Vector< t_dims, t_type > & point,
const t_buffer_type & elements,
t_type & min_distance,
const t_type & epsilon,
MinHeap< t_type, uint04 > & heap,
uint04 size ) const
inlineprotected

◆ _getEnclosedElements()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_area_type , class t_buffer_type >
void _getEnclosedElements ( uint04 top_node,
t_area_type area,
Buffer< bool > & indices,
const t_buffer_type & elements ) const
inlineprotected

◆ _getNumberOfEnclosedElements()

template<uint01 t_dims, class t_type >
template<class t_area_type , class t_node_type , class t_buffer_type >
uint04 _getNumberOfEnclosedElements ( uint04 top_node,
const t_area_type & area,
const t_buffer_type & elements ) const
inlineprotected

◆ _makeWriteable()

template<uint01 t_dims, class t_type >
void _makeWriteable ( )
inlineprotected

◆ _moveValue()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
void _moveValue ( uint04 top_node,
uint04 index,
const t_node_type & new_location,
const t_buffer_type & elements )
inlineprotected

◆ _removeValue()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
void _removeValue ( uint04 top_node,
uint04 index,
const t_buffer_type & elements )
inlineprotected

◆ needsRebalance()

template<uint01 t_dims, class t_type >
bool needsRebalance ( uint04 left_size,
uint04 right_size )
inlineprotected

◆ recalculateBounds()

template<uint01 t_dims, class t_type >
template<class t_node_type , class t_buffer_type >
bool recalculateBounds ( uint04 node_index,
const t_buffer_type & elements )
inlineprotected

◆ useBulkResize()

template<uint01 t_dims, class t_type >
bool useBulkResize ( uint04 change_size)
inlineprotected

◆ validate()

template<uint01 t_dims, class t_type >
template<class t_node_type >
bool validate ( const Buffer< t_node_type > & elements)
inline

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