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

#include <RTree.hpp>

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

Public Member Functions

 RTreeBase (uint04 bucket_size)
 
 RTreeBase (const RTreeBase< t_dims, t_type > &tree)
 
 RTreeBase (RTreeBase< t_dims, t_type > &&tree)
 
template<class t_buffer_type >
bool validate (const t_buffer_type &elements)
 
void traverse (const std::function< void(uint04 node_index, const Buffer< RNode< t_dims, t_type >, uint04, ObjectAllocator< true > > &node, const Buffer< uint04 > &indices)> &callback) const
 
- Public Member Functions inherited from TreeBase< RNode< t_dims, t_type >, t_type, 2 >
uint04 getIndex (uint04 index) const
 
void clear ()
 
uint04 getNumberOfNodes () const
 
const RNode< 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

 RTreeBase (const Buffer< RNode< t_dims, t_type > > &nodes, const Buffer< uint04 > &indices, bool is_read_only)
 
template<class t_buffer_type >
uint04 _calculateAndSplit (uint04 node_index, TreeBoundarySorter< t_dims, t_type > &sorter, const t_buffer_type &elements, uint04 start, uint04 end, bool is_precise)
 
template<bool t_has_nans, bool t_uses_boundary, 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_location_type >
bool predictBranch (uint04 &index, const RNode< t_dims, t_type > &node, const t_location_type &selector, MaxHeap< t_type, uint04 > &node_heap, t_type min_distance_squared) const
 
template<bool t_presorted, class t_location_type , class t_buffer_type >
void _getClosestElement (uint04 top_index, const t_location_type &selector, const t_buffer_type &elements, t_type &min_distance_squared, const t_type &epsilon, uint04 &min_index) const
 
template<bool t_presorted, class t_buffer_type , class t_reference_type >
void _getClosestElements (uint04 top_index, const t_reference_type &selector, const t_buffer_type &elements, t_type &min_distance_squared, const t_type &epsilon, MinHeap< t_type, uint04 > &value_heap, uint04 size) const
 
template<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<bool t_is_presorted, class t_area_type , class t_buffer_type >
void _getEnclosedElements (uint04 top_node, t_area_type area, Buffer< uint04 > &indices, const t_buffer_type &elements) const
 
template<class t_area_type , class t_buffer_type >
uint04 _getNumberOfEnclosedElements (uint04 top_node, const t_area_type &area, const t_buffer_type &elements) const
 
template<class t_area_type , class t_buffer_type >
void _getNearElements (uint04 top_node, t_type max_distance, const t_area_type &area, Buffer< bool > &indices, const t_buffer_type &elements) const
 
template<class t_area_type , class t_buffer_type >
void _getChangedElements (uint04 top_node, 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
 
template<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 &old_location, const t_buffer_type &elements, bool rebalance)
 
bool needsRebalance (uint04 left_size, uint04 right_size)
 
bool useBulkResize (uint04 change_size)
 
template<bool t_has_nans, bool t_uses_boundary, class t_buffer_type >
void _addValues (uint04 top_node, Buffer< uint04 > indices, const t_buffer_type &elements, bool is_precise, ProgressInfo *progress=nullptr)
 
template<bool t_has_nans, bool t_uses_boundary, class t_buffer_type >
void _addValue (uint04 node_index, uint04 index, const t_buffer_type &elements, bool balance)
 
template<class t_buffer_type >
bool recalculateBounds (uint04 node_index, const t_buffer_type &elements)
 
void _makeWriteable ()
 
- Protected Member Functions inherited from TreeBase< RNode< t_dims, t_type >, t_type, 2 >
 TreeBase (uint04 bucket_size)
 
 TreeBase (const TreeBase &tree)
 
 TreeBase (TreeBase &&tree)
 
 TreeBase (const Buffer< RNode< 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< RNode< t_dims, t_type >, t_type, 2 >
Buffer< uint04m_indices
 
Buffer< RNode< 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< RNode< t_dims, t_type >, t_type, 2 >
static const uint04 root_node
 

Constructor & Destructor Documentation

◆ RTreeBase() [1/4]

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

◆ RTreeBase() [2/4]

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

◆ RTreeBase() [3/4]

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

◆ RTreeBase() [4/4]

template<uint01 t_dims, class t_type >
RTreeBase ( const Buffer< RNode< 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<bool t_has_nans, bool t_uses_boundary, class t_buffer_type >
void _addValue ( uint04 node_index,
uint04 index,
const t_buffer_type & elements,
bool balance )
inlineprotected

◆ _addValues()

template<uint01 t_dims, class t_type >
template<bool t_has_nans, bool t_uses_boundary, 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<bool t_has_nans, bool t_uses_boundary, 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_buffer_type >
uint04 _calculateAndSplit ( uint04 node_index,
TreeBoundarySorter< t_dims, t_type > & sorter,
const t_buffer_type & elements,
uint04 start,
uint04 end,
bool is_precise )
inlineprotected

◆ _getChangedElements()

template<uint01 t_dims, class t_type >
template<class t_area_type , class t_buffer_type >
void _getChangedElements ( uint04 top_node,
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
inlineprotected

◆ _getClosestElement()

template<uint01 t_dims, class t_type >
template<bool t_presorted, class t_location_type , class t_buffer_type >
void _getClosestElement ( uint04 top_index,
const t_location_type & selector,
const t_buffer_type & elements,
t_type & min_distance_squared,
const t_type & epsilon,
uint04 & min_index ) const
inlineprotected

◆ _getClosestElements()

template<uint01 t_dims, class t_type >
template<bool t_presorted, class t_buffer_type , class t_reference_type >
void _getClosestElements ( uint04 top_index,
const t_reference_type & selector,
const t_buffer_type & elements,
t_type & min_distance_squared,
const t_type & epsilon,
MinHeap< t_type, uint04 > & value_heap,
uint04 size ) const
inlineprotected

◆ _getEnclosedElements() [1/2]

template<uint01 t_dims, class t_type >
template<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

◆ _getEnclosedElements() [2/2]

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

◆ _getNearElements()

template<uint01 t_dims, class t_type >
template<class t_area_type , class t_buffer_type >
void _getNearElements ( uint04 top_node,
t_type max_distance,
const 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_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 & old_location,
const t_buffer_type & elements,
bool rebalance )
inlineprotected

◆ _removeValue()

template<uint01 t_dims, class t_type >
template<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

◆ predictBranch()

template<uint01 t_dims, class t_type >
template<class t_location_type >
bool predictBranch ( uint04 & index,
const RNode< t_dims, t_type > & node,
const t_location_type & selector,
MaxHeap< t_type, uint04 > & node_heap,
t_type min_distance_squared ) const
inlineprotected

◆ recalculateBounds()

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

◆ traverse()

template<uint01 t_dims, class t_type >
void traverse ( const std::function< void(uint04 node_index, const Buffer< RNode< t_dims, t_type >, uint04, ObjectAllocator< true > > &node, const Buffer< uint04 > &indices)> & callback) const
inline

◆ 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_buffer_type >
bool validate ( const t_buffer_type & elements)
inline

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