Luanti 5.16.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.

References coords, and n.

Referenced by Points(), and assign().

Here is the caller graph for this function:

◆ 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!

References coords, and n.

◆ 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 Points(), begin(), coords, and 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 Points(), begin(), and end().

Here is the call graph for this function:

◆ begin() [1/2]

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

References coords, and n.

Referenced by Points(), assign(), end(), end(), getPoint(), setPoint(), k_d_tree::DynamicKdTrees< Dim, Component, Id >::shrink_to_half(), and k_d_tree::SortedIndices< Dim >::split().

Here is the caller graph for this function:

◆ begin() [2/2]

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

References coords, and n.

◆ end() [1/2]

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

References begin(), and n.

Referenced by assign().

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 begin(), and 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 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 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 n.

Member Data Documentation

◆ coords

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

Referenced by Points(), Points(), Points(), begin(), and begin().

◆ n

template<uint8_t Dim, typename Component>
size_t k_d_tree::Points< Dim, Component >::n
private

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