Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
k_d_tree::Points< Dim, Component > Class Template Reference

#include <k_d_tree.h>

+ Collaboration diagram for k_d_tree::Points< Dim, Component >:

Public Types

using Point = std::array<Component, Dim>
 

Public Member Functions

 Points ()
 Empty.
 
 Points (size_t n)
 Allocating constructor; leaves coords uninitialized!
 
 Points (size_t n, const std::array< Component const *, Dim > &coords)
 Copying constructor.
 
size_t size () const
 
void assign (Idx start, const Points &from)
 
Point getPoint (Idx i) const
 
void setPoint (Idx i, const Point &point)
 
Component * begin (uint8_t d)
 
Component * end (uint8_t d)
 
const Component * begin (uint8_t d) const
 
const Component * end (uint8_t d) const
 

Private Attributes

size_t n
 
std::unique_ptr< Component[]> coords
 

Member Typedef Documentation

◆ Point

template<uint8_t Dim, typename Component >
using k_d_tree::Points< Dim, Component >::Point = std::array<Component, Dim>

Constructor & Destructor Documentation

◆ Points() [1/3]

template<uint8_t Dim, typename Component >
k_d_tree::Points< Dim, Component >::Points ( )
inline

Empty.

◆ Points() [2/3]

template<uint8_t Dim, typename Component >
k_d_tree::Points< Dim, Component >::Points ( size_t n)
inline

Allocating constructor; leaves coords uninitialized!

◆ Points() [3/3]

template<uint8_t Dim, typename Component >
k_d_tree::Points< Dim, Component >::Points ( size_t n,
const std::array< Component const *, Dim > & coords )
inline

Copying constructor.

References k_d_tree::Points< Dim, Component >::begin(), k_d_tree::Points< Dim, Component >::coords, and k_d_tree::Points< Dim, Component >::n.

+ Here is the call graph for this function:

Member Function Documentation

◆ assign()

template<uint8_t Dim, typename Component >
void k_d_tree::Points< Dim, Component >::assign ( Idx start,
const Points< Dim, Component > & from )
inline

References k_d_tree::Points< Dim, Component >::begin(), and k_d_tree::Points< Dim, Component >::end().

+ Here is the call graph for this function:

◆ begin() [1/2]

◆ begin() [2/2]

template<uint8_t Dim, typename Component >
const Component * k_d_tree::Points< Dim, Component >::begin ( uint8_t d) const
inline

◆ end() [1/2]

template<uint8_t Dim, typename Component >
Component * k_d_tree::Points< Dim, Component >::end ( uint8_t d)
inline

References k_d_tree::Points< Dim, Component >::begin(), and k_d_tree::Points< Dim, Component >::n.

Referenced by k_d_tree::Points< Dim, Component >::assign(), k_d_tree::SortedIndices< Dim >::end(), k_d_tree::SortedIndices< Dim >::end(), and k_d_tree::SortedIndices< Dim >::split().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end() [2/2]

template<uint8_t Dim, typename Component >
const Component * k_d_tree::Points< Dim, Component >::end ( uint8_t d) const
inline

References k_d_tree::Points< Dim, Component >::begin(), and k_d_tree::Points< Dim, Component >::n.

+ Here is the call graph for this function:

◆ getPoint()

template<uint8_t Dim, typename Component >
Point k_d_tree::Points< Dim, Component >::getPoint ( Idx i) const
inline

References k_d_tree::Points< Dim, Component >::begin().

+ Here is the call graph for this function:

◆ setPoint()

template<uint8_t Dim, typename Component >
void k_d_tree::Points< Dim, Component >::setPoint ( Idx i,
const Point & point )
inline

References k_d_tree::Points< Dim, Component >::begin().

Referenced by k_d_tree::DynamicKdTrees< Dim, Component, Id >::shrink_to_half().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

template<uint8_t Dim, typename Component >
size_t k_d_tree::Points< Dim, Component >::size ( ) const
inline

References k_d_tree::Points< Dim, Component >::n.

Referenced by k_d_tree::SortedIndices< Dim >::size(), and k_d_tree::SortedIndices< Dim >::split().

+ Here is the caller graph for this function:

Member Data Documentation

◆ coords

template<uint8_t Dim, typename Component >
std::unique_ptr<Component[]> k_d_tree::Points< Dim, Component >::coords
private

◆ n


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