Alexandria  2.27.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | 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]

Classes

class  Leaf
 
class  Node
 
class  Split
 

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< Nodem_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

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

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

Definition at line 123 of file KdTree.icpp.

References std::vector< T >::empty(), std::vector< T >::front(), std::move(), and std::vector< T >::size().

Here is the call graph for this function:

Member Function Documentation

template<typename T , typename DistanceMethod >
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

Definition at line 146 of file KdTree.icpp.

References KdTree::KdTree< T, DistanceMethod >::countPointsWithinRadius().

Referenced by KdTree::KdTree< T, DistanceMethod >::countPointsWithinRadius().

Here is the call graph for this function:

template<typename T , typename DistanceMethod >
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

Definition at line 139 of file KdTree.icpp.

Member Data Documentation

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

Definition at line 93 of file KdTree.h.

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 files: