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

#include <ThreadedRTree.h>

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

Public Member Functions

 ThreadedRTree (uint04 bucket_size)
 
 ThreadedRTree (const RTree< t_dims, t_type > &tree)
 
 ThreadedRTree (RTree< t_dims, t_type > &&tree)
 
template<class t_node_type >
bool addAllThreaded (const Buffer< t_node_type > &elements, ProgressInfo *progress=nullptr)
 
template<class t_node_type >
bool addAllThreaded (const Buffer< t_node_type > &elements, uint04 start_index, uint04 end_index, ProgressInfo *progress=nullptr)
 
template<class t_node_type >
bool _balanceLeafNodeThreaded (uint04 level, const uint04 node_index, const Buffer< t_node_type > &elements, Buffer< uint04 > &indices, uint04 start, uint04 end, ProgressInfo *progress=nullptr)
 
template<class t_node_type >
Bounds< t_dims, t_type > _getBoundingBoxThreaded (uint04 top_level, const Buffer< uint04 > &indices, const Buffer< t_node_type > &elements, uint04 start, uint04 end)
 
void splitLeafNode (uint04 index) final override
 
- Public Member Functions inherited from RTree< t_dims, t_type >
 RTree ()
 
 RTree (uint04 bucket_size)
 
 RTree (const RTreeBase< t_dims, t_type > &tree)
 
 RTree (RTreeBase< t_dims, t_type > &&tree)
 
 RTree (const RTree< t_dims, t_type > &value)
 
 RTree (RTree< t_dims, t_type > &&value) noexcept
 
Bounds< t_dims, t_type > bounds () const
 
RTreeoperator= (const RTree &value)
 
RTreeoperator= (RTree &&value)
 
void mapToFile (BinaryFile &file, Buffer< BinaryCompressionObject > &objects, uint04 compression_index=0)
 
void compress (Buffer< BinaryCompressionObject > &objects, Buffer< Buffer< uint01 > > &compressed_data, uint04 compression_index, uint04 internal_index)
 
void mapToFile (BinaryFile &file, CompressionMode mode)
 
void mapFromFile (BinaryFile &file)
 
virtual const char * getTreeType () const override
 
- Public Member Functions inherited from Tree< t_dims, t_type, RTreeBase< 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 RTreeBase< t_dims, t_type >
 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
 

Public Attributes

std::mutex m_split_lock
 
uint04 m_number_of_threads
 

Additional Inherited Members

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

◆ ThreadedRTree() [1/3]

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

◆ ThreadedRTree() [2/3]

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

◆ ThreadedRTree() [3/3]

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

Member Function Documentation

◆ _balanceLeafNodeThreaded()

template<uint01 t_dims, class t_type >
template<class t_node_type >
bool _balanceLeafNodeThreaded ( uint04 level,
const uint04 node_index,
const Buffer< t_node_type > & elements,
Buffer< uint04 > & indices,
uint04 start,
uint04 end,
ProgressInfo * progress = nullptr )
inline

◆ _getBoundingBoxThreaded()

template<uint01 t_dims, class t_type >
template<class t_node_type >
Bounds< t_dims, t_type > _getBoundingBoxThreaded ( uint04 top_level,
const Buffer< uint04 > & indices,
const Buffer< t_node_type > & elements,
uint04 start,
uint04 end )
inline

◆ addAllThreaded() [1/2]

template<uint01 t_dims, class t_type >
template<class t_node_type >
bool addAllThreaded ( const Buffer< t_node_type > & elements,
ProgressInfo * progress = nullptr )
inline

◆ addAllThreaded() [2/2]

template<uint01 t_dims, class t_type >
template<class t_node_type >
bool addAllThreaded ( const Buffer< t_node_type > & elements,
uint04 start_index,
uint04 end_index,
ProgressInfo * progress = nullptr )
inline

◆ splitLeafNode()

template<uint01 t_dims, class t_type >
void splitLeafNode ( uint04 index)
inlinefinaloverride

Member Data Documentation

◆ m_number_of_threads

template<uint01 t_dims, class t_type >
uint04 m_number_of_threads

◆ m_split_lock

template<uint01 t_dims, class t_type >
std::mutex m_split_lock

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