Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
KdTree::KdTree< T, DistanceMethod > Class Template Reference

#include <KdTree.h>

Collaboration diagram for KdTree::KdTree< T, DistanceMethod >:
Collaboration graph
[legend]

Public Types

using Traits = KdTreeTraits<T>
 

Public Member Functions

 KdTree (const std::vector< T > &data, std::size_t leaf_size=100)
 
std::vector< T > findPointsWithinRadius (const T &coord, double radius) const
 
std::size_t countPointsWithinRadius (const T &coord, double radius) const
 

Private Attributes

std::size_t m_dimensionality
 
std::shared_ptr< Node > m_root
 

Detailed Description

template<typename T, typename DistanceMethod = EuclideanDistance<T>>
class KdTree::KdTree< T, DistanceMethod >

Definition at line 68 of file KdTree.h.

Member Typedef Documentation

◆ Traits

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
using KdTree::KdTree< T, DistanceMethod >::Traits = KdTreeTraits<T>

Definition at line 70 of file KdTree.h.

Constructor & Destructor Documentation

◆ KdTree()

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
KdTree::KdTree< T, DistanceMethod >::KdTree ( const std::vector< T > & data,
std::size_t leaf_size = 100 )
explicit

Member Function Documentation

◆ countPointsWithinRadius()

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
std::size_t KdTree::KdTree< T, DistanceMethod >::countPointsWithinRadius ( const T & coord,
double radius ) const

Count how many points are within the given radius from the coordonate coord

Parameters
coord
radius
Returns

◆ findPointsWithinRadius()

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
std::vector< T > KdTree::KdTree< T, DistanceMethod >::findPointsWithinRadius ( const T & coord,
double radius ) const

Return the points that are within the given radius from the coordinate coord

Parameters
coord
radius
Returns

Member Data Documentation

◆ m_dimensionality

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
std::size_t KdTree::KdTree< T, DistanceMethod >::m_dimensionality
private

Definition at line 95 of file KdTree.h.

◆ m_root

template<typename T , typename DistanceMethod = EuclideanDistance<T>>
std::shared_ptr<Node> KdTree::KdTree< T, DistanceMethod >::m_root
private

Definition at line 96 of file KdTree.h.


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