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

#include <KDTree.hpp>

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

Public Member Functions

 KDTree (uint04 bucket_size)
 
 KDTree (const KDTreeBase< t_dims, t_type > &tree)
 
 KDTree (KDTreeBase< t_dims, t_type > &&tree)
 
KDTreeoperator= (const KDTree &value)
 
KDTreeoperator= (KDTree &&value)
 
virtual const char * getTreeType () const override
 
- Public Member Functions inherited from Tree< t_dims, t_type, KDTreeBase< t_dims, t_type > >
void getAll (Buffer< bool > &indices) const
 
void getAll (Buffer< uint04 > &indices) const
 
uint04 closestElement (const t_reference_type &point, const t_buffer_type &elements, t_type epsilon=cast< t_type >(0)) const
 
uint04 closestElement (const t_reference_type &point, const t_buffer_type &elements, t_type &max_distance_squared, t_type epsilon=cast< t_type >(0)) const
 
uint04 closestElementPresorted (const t_reference_type &point, const t_buffer_type &elements, t_type epsilon=cast< t_type >(0)) const
 
uint04 closestElementPresorted (const t_reference_type &point, const t_buffer_type &elements, t_type &max_distance_squared, t_type epsilon=cast< t_type >(0)) const
 
void enclosedElements (const t_area_type &area, Buffer< uint04 > &indices, const t_buffer_type &elements) const
 
void enclosedElements (const t_area_type &area, Buffer< bool > &indices, const t_buffer_type &elements) const
 
void presortedEnclosedElements (const t_area_type &area, Buffer< uint04 > &indices, const t_buffer_type &elements) const
 
void getChangedElements (const t_area_type &new_area, const t_area_type &old_area, Buffer< bool > &indices, const t_buffer_type &elements, bool allow_enable, bool allow_disable) const
 
uint04 getNumberOfEnclosedElements (const t_area_type &area, const t_buffer_type &elements) const
 
void closestElements (const t_reference_type &point, uint04 size, Buffer< uint04 > &indices, const t_buffer_type &elements, t_type &max_distance, t_type epsilon=cast< t_type >(0)) const
 
void closestElements (const t_reference_type &point, uint04 size, MinHeap< t_type, uint04 > &value_heap, const t_buffer_type &elements, t_type &max_distance, t_type epsilon=cast< t_type >(0)) const
 
void presortedClosestElements (const t_reference_type &point, uint04 size, MinHeap< t_type, uint04 > &value_heap, const t_buffer_type &elements, t_type &max_distance, t_type epsilon=cast< t_type >(0)) const
 
void swapIndices (uint04 index_a, uint04 index_b)
 
void addValue (uint04 index, const t_buffer_type &elements, bool rebalance)
 
void addValues (const Buffer< bool > &insertion_indices, const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
void addValues (const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
void addValues (uint04 start_index, uint04 end_index, const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
void addValues (const Buffer< uint04 > &indices, const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
void removeValue (uint04 index, const t_buffer_type &elements)
 
void removeValues (const Buffer< bool > &insertion_indices, const t_buffer_type &elements, ProgressInfo *progress=nullptr)
 
void removeValues (uint04 start_index, uint04 end_index, const t_buffer_type &elements, ProgressInfo *progress=nullptr)
 
- Public Member Functions inherited from KDTreeBase< t_dims, t_type >
 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

 KDTree (const Buffer< KDNode< t_dims, t_type > > &nodes, const Buffer< uint04 > &indices, bool is_read_only)
 
- Protected Member Functions inherited from Tree< t_dims, t_type, KDTreeBase< t_dims, t_type > >
 Tree (uint04 bucket_size)
 
 Tree (const KDTreeBase< t_dims, t_type > &tree)
 
 Tree (KDTreeBase< t_dims, t_type > &&tree)
 
- Protected Member Functions inherited from KDTreeBase< t_dims, t_type >
 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

◆ KDTree() [1/4]

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

◆ KDTree() [2/4]

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

◆ KDTree() [3/4]

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

◆ KDTree() [4/4]

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

Member Function Documentation

◆ getTreeType()

template<uint01 t_dims, class t_type >
virtual const char * getTreeType ( ) const
inlineoverridevirtual

◆ operator=() [1/2]

template<uint01 t_dims, class t_type >
KDTree & operator= ( const KDTree< t_dims, t_type > & value)
inline

◆ operator=() [2/2]

template<uint01 t_dims, class t_type >
KDTree & operator= ( KDTree< t_dims, t_type > && value)
inline

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