39 template<u
int01 t_dims,
class t_type>
48 m_indices.allocateSpace<
false>(bucket_size);
59 template<
class t_node_type>
66 if (progress !=
nullptr) progress->allowCancel(
true);
68 if (progress !=
nullptr) progress->allowCancel(
false);
77 template<
class t_node_type>
84 if (progress !=
nullptr) progress->allowCancel(
true);
86 if (progress !=
nullptr) progress->allowCancel(
false);
96 template<
class t_node_type>
99 uint04 level_value = pow(2U, level);
108 [
this, level, start, new_left, node_index, progress, &
indices, &elements] {
113 [
this, level, end, new_left, node_index, progress, &
indices, &elements] {
121 template<
class t_node_type>
130 const uint04 middle = start + (end - start) / 2;
134 [
this, &left, &
indices, &elements, start, middle, top_level] {
137 [
this, &right, &
indices, &elements, end, middle, top_level] {
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
constexpr t_index_type size() const
Definition Buffer.hpp:1461
void ensureCapacity(t_index_type new_capacity, bool ensure_not_greater=false, bool ensure_not_less=true)
Definition Buffer.hpp:803
Definition ProgressInfo.hpp:43
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)
Definition RTree.hpp:254
uint04 _calculateAndSplit(uint04 node_index, TreeBoundarySorter< t_dims, t_type > &sorter, const t_buffer_type &elements, uint04 start, uint04 end, bool is_precise)
Definition RTree.hpp:219
Definition RTree.hpp:1014
RTree()
Definition RTree.hpp:1020
Bounds< t_dims, t_type > bounds() const
Definition RTree.hpp:1050
Definition ThreadedRTree.h:41
bool _balanceLeafNodeThreaded(uint04 level, const uint04 node_index, const Buffer< t_node_type > &elements, Buffer< uint04 > &indices, uint04 start, uint04 end, ProgressInfo *progress=nullptr)
Definition ThreadedRTree.h:97
bool addAllThreaded(const Buffer< t_node_type > &elements, uint04 start_index, uint04 end_index, ProgressInfo *progress=nullptr)
Definition ThreadedRTree.h:78
void splitLeafNode(uint04 index) final override
Definition ThreadedRTree.h:144
ThreadedRTree(uint04 bucket_size)
Definition ThreadedRTree.h:44
bool addAllThreaded(const Buffer< t_node_type > &elements, ProgressInfo *progress=nullptr)
Definition ThreadedRTree.h:60
std::mutex m_split_lock
Definition ThreadedRTree.h:151
Bounds< t_dims, t_type > _getBoundingBoxThreaded(uint04 top_level, const Buffer< uint04 > &indices, const Buffer< t_node_type > &elements, uint04 start, uint04 end)
Definition ThreadedRTree.h:122
uint04 m_number_of_threads
Definition ThreadedRTree.h:152
Buffer< RNode< t_dims, t_type >, uint04, ObjectAllocator< true > > m_nodes
Definition Tree.hpp:480
const Buffer< uint04 > & indices() const
Definition Tree.hpp:287
Buffer< uint04 > prepareAddAll(const Buffer< bool > &index_values)
Definition Tree.hpp:322
Bounds< t_dims, t_type > _getBounds(const Buffer< uint04 > &indices, const t_buffer_type &elements, uint04 start, uint04 end)
Definition Tree.hpp:257
Buffer< uint04 > m_indices
Definition Tree.hpp:479
static const uint04 root_node
Definition Tree.hpp:483
void splitLeafNode(uint04 index)
Definition Tree.hpp:353
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514