Ponca  7df32c91629c89b89840c4d7917cb272433f2d2b
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::KnnGraphBase< Traits > Class Template Reference
+ Inheritance diagram for Ponca::KnnGraphBase< Traits >:
+ Collaboration diagram for Ponca::KnnGraphBase< Traits >:

Public Types

using DataPoint = typename Traits::DataPoint
 DataPoint given by user via Traits

 
using Scalar = typename DataPoint::Scalar
 Scalar given by user via DataPoint

 
using VectorType = typename DataPoint::VectorType
 VectorType given by user via DataPoint

 
using IndexType = typename Traits::IndexType
 Type used to index points into the PointContainer.
 
using PointContainer = typename Traits::PointContainer
 Container for DataPoint used inside the KdTree

 
using IndexContainer = typename Traits::IndexContainer
 Container for indices used inside the KdTree

 
- Public Types inherited from Ponca::StaticKnnGraphBase< Traits >
using DataPoint = typename Traits::DataPoint
 DataPoint given by user via Traits

 
using Scalar = typename DataPoint::Scalar
 Scalar given by user via DataPoint

 
using VectorType = typename DataPoint::VectorType
 VectorType given by user via DataPoint

 
using IndexType = typename Traits::IndexType
 Type used to index points into the PointContainer.
 
using PointContainer = typename Traits::PointContainer
 Container for DataPoint used inside the KdTree

 
using IndexContainer = typename Traits::IndexContainer
 Container for indices used inside the KdTree

 
using KNearestIndexQuery = KnnGraphKNearestQuery< Traits >
 
using RangeIndexQuery = KnnGraphRangeQuery< Traits >
 

Public Member Functions

template<typename KdTreeTraits >
 KnnGraphBase (const KdTreeBase< KdTreeTraits > &_kdtree, const int _k=6)
 Build a KnnGraph from a KdTreeDense.
 
- Public Member Functions inherited from Ponca::StaticKnnGraphBase< Traits >
 StaticKnnGraphBase (Buffers &_bufs)
 Constructor that allows the use of prebuilt KnnGraph containers.
 
KNearestIndexQuery kNearestNeighbors (int index) const
 Computes a Query object to iterate over the k-nearest neighbors of a point.
 
RangeIndexQuery rangeNeighbors (int index, Scalar r) const
 Computes a Query object to iterate over the neighbors that are inside a given radius.
 
KNearestIndexQuery kNearestNeighborsIndexQuery () const
 Convenience function that provides a k-nearest neighbors Query object.
 
RangeIndexQuery rangeNeighborsIndexQuery () const
 Convenience function that provides an empty range neighbors Query object.
 
int k () const
 Number of neighbor per vertex.
 
size_t size () const
 Number of vertices in the neighborhood graph.
 
IndexType sampleCount () const
 Get the number of indices.
 
IndexType pointCount () const
 Get the number of points.
 
PointContainer points () const
 Get the internal point container.
 
IndexContainer samples () const
 Get the internal index container.
 
const Buffersbuffers () const
 Get access to the internal buffer, for instance to prepare GPU binding.
 

Additional Inherited Members

- Protected Member Functions inherited from Ponca::StaticKnnGraphBase< Traits >
const IndexTypegetIndexPtr () const
 
IndexTypegetIndexPtr ()
 
 StaticKnnGraphBase (PointContainer _points, const int _k)
 
- Protected Attributes inherited from Ponca::StaticKnnGraphBase< Traits >
Buffers m_bufs
 Buffers used to store the KnnGraph.
 

Detailed Description

template<typename Traits>
class Ponca::KnnGraphBase< Traits >

Definition at line 190 of file knnGraph.h.

Member Typedef Documentation

◆ DataPoint

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::DataPoint = typename Traits::DataPoint

DataPoint given by user via Traits

Definition at line 193 of file knnGraph.h.

◆ IndexContainer

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::IndexContainer = typename Traits::IndexContainer

Container for indices used inside the KdTree

Definition at line 193 of file knnGraph.h.

◆ IndexType

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::IndexType = typename Traits::IndexType

Type used to index points into the PointContainer.

Definition at line 193 of file knnGraph.h.

◆ PointContainer

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::PointContainer = typename Traits::PointContainer

Container for DataPoint used inside the KdTree

Definition at line 193 of file knnGraph.h.

◆ Scalar

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::Scalar = typename DataPoint::Scalar

Scalar given by user via DataPoint

Definition at line 193 of file knnGraph.h.

◆ VectorType

template<typename Traits >
using Ponca::KnnGraphBase< Traits >::VectorType = typename DataPoint::VectorType

VectorType given by user via DataPoint

Definition at line 193 of file knnGraph.h.

Constructor & Destructor Documentation

◆ KnnGraphBase()

template<typename Traits >
template<typename KdTreeTraits >
Ponca::KnnGraphBase< Traits >::KnnGraphBase ( const KdTreeBase< KdTreeTraits > &  _kdtree,
const int  _k = 6 
)
inline

Build a KnnGraph from a KdTreeDense.

Parameters
_kdtreeReference to the KdTree
_kNumber of requested neighbors. Might be reduced if k is larger than the kdtree size - 1 (query point is not included in query output, thus -1)
Warning
Stores a const reference to kdtree.point_data()
KdTreeTraits compatibility is checked with static assertion

Definition at line 208 of file knnGraph.h.