Ponca  eb7239a9c07e156fb1edc6faac7fe89e2b256bda
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType > Class Template Reference

Extension of the Query class that allows to read the result of a k-nearest neighbors search on the KdTree. More...

#include <kdTreeKNearestQueries.h>

Inheritance diagram for Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >:
Collaboration diagram for Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >:

Public Types

using DataPoint = typename Traits::DataPoint
using IndexType = typename Traits::IndexType
using Scalar = typename DataPoint::Scalar
using VectorType = typename DataPoint::VectorType
using QueryAccelType = KdTreeQuery<Traits>
using Iterator = IteratorType<typename Traits::IndexType, typename Traits::DataPoint, Traits::MAX_KNN_SIZE>
using Self = KdTreeKNearestQueryBase<Traits, IteratorType, QueryType>
Public Types inherited from Ponca::KdTreeQuery< Traits >
using DataPoint = typename Traits::DataPoint
using IndexType = typename Traits::IndexType
using Scalar = typename DataPoint::Scalar
using VectorType = typename DataPoint::VectorType

Public Member Functions

 KdTreeKNearestQueryBase (const StaticKdTreeBase< Traits > *kdtree, IndexType k, typename QueryType::InputType input)
Self & operator() (typename QueryType::InputType input, IndexType k)
 Call the k-nearest neighbors query with new input and neighbor number parameters.
Self & operator() (typename QueryType::InputType input)
 Call the k-nearest neighbors query with new input parameter.
Iterator begin ()
 Returns an iterator to the beginning of the k-nearest neighbors query.
Iterator end ()
 Returns an iterator to the end of the k-nearest neighbors query.
Public Member Functions inherited from Ponca::KdTreeQuery< Traits >
 KdTreeQuery (const StaticKdTreeBase< Traits > *kdtree)

Protected Member Functions

void search ()
Protected Member Functions inherited from Ponca::KdTreeQuery< Traits >
void reset ()
 Init stack for a new search.
template<typename LeafPreparationFunctor, typename DescentDistanceThresholdFunctor, typename SkipIndexFunctor, typename ProcessNeighborFunctor>
bool searchInternal (const VectorType &point, LeafPreparationFunctor prepareLeafTraversal, DescentDistanceThresholdFunctor descentDistanceThreshold, SkipIndexFunctor skipFunctor, ProcessNeighborFunctor processNeighborFunctor)
 Search internally the neighbors of a point using the kdtree.

Additional Inherited Members

Protected Attributes inherited from Ponca::KdTreeQuery< Traits >
const StaticKdTreeBase< Traits > * m_kdtree {nullptr}
 [KdTreeQuery kdtree type]
Stack< IndexSquaredDistance< IndexType, Scalar >, 2 *Traits::MAX_DEPTH > m_stack
 [KdTreeQuery kdtree type]

Detailed Description

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
class Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >

Extension of the Query class that allows to read the result of a k-nearest neighbors search on the KdTree.

Output result of a KdTreeBase::kNearestNeighbors query request.

See also
KdTreeBase

Definition at line 24 of file kdTreeKNearestQueries.h.

Member Typedef Documentation

◆ DataPoint

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::DataPoint = typename Traits::DataPoint

Definition at line 27 of file kdTreeKNearestQueries.h.

◆ IndexType

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::IndexType = typename Traits::IndexType

Definition at line 28 of file kdTreeKNearestQueries.h.

◆ Iterator

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::Iterator = IteratorType<typename Traits::IndexType, typename Traits::DataPoint, Traits::MAX_KNN_SIZE>

Definition at line 32 of file kdTreeKNearestQueries.h.

◆ QueryAccelType

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::QueryAccelType = KdTreeQuery<Traits>

Definition at line 31 of file kdTreeKNearestQueries.h.

◆ Scalar

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::Scalar = typename DataPoint::Scalar

Definition at line 29 of file kdTreeKNearestQueries.h.

◆ Self

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::Self = KdTreeKNearestQueryBase<Traits, IteratorType, QueryType>

Definition at line 33 of file kdTreeKNearestQueries.h.

◆ VectorType

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
using Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::VectorType = typename DataPoint::VectorType

Definition at line 30 of file kdTreeKNearestQueries.h.

Constructor & Destructor Documentation

◆ KdTreeKNearestQueryBase()

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::KdTreeKNearestQueryBase ( const StaticKdTreeBase< Traits > * kdtree,
IndexType k,
typename QueryType::InputType input )
inline

Definition at line 35 of file kdTreeKNearestQueries.h.

Member Function Documentation

◆ begin()

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
Iterator Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::begin ( )
inline

Returns an iterator to the beginning of the k-nearest neighbors query.

Definition at line 53 of file kdTreeKNearestQueries.h.

◆ end()

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
Iterator Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::end ( )
inline

Returns an iterator to the end of the k-nearest neighbors query.

Definition at line 62 of file kdTreeKNearestQueries.h.

◆ operator()() [1/2]

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
Self & Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::operator() ( typename QueryType::InputType input)
inline

Call the k-nearest neighbors query with new input parameter.

Definition at line 47 of file kdTreeKNearestQueries.h.

◆ operator()() [2/2]

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
Self & Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::operator() ( typename QueryType::InputType input,
IndexType k )
inline

Call the k-nearest neighbors query with new input and neighbor number parameters.

Definition at line 42 of file kdTreeKNearestQueries.h.

◆ search()

template<typename Traits, template< typename, typename, int > typename IteratorType, typename QueryType>
void Ponca::KdTreeKNearestQueryBase< Traits, IteratorType, QueryType >::search ( )
inlineprotected

Definition at line 65 of file kdTreeKNearestQueries.h.