|
Ponca
3415d6bf4b5de0468067f7a5953b71ec2d1f6564
Point Cloud Analysis library
|
Customizable base class for KnnGraph datastructure. More...
#include <knnGraph.h>
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 |
| 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, int k=6) | |
| Build a KnnGraph from a KdTreeDense. | |
| 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. | |
Protected Member Functions | |
| const IndexContainer & | index_data () const |
Protected Attributes | |
| const PointContainer & | m_kdTreePoints |
Friends | |
| class | KnnGraphKNearestQuery< Traits > |
| class | KnnGraphRangeQuery< Traits > |
Customizable base class for KnnGraph datastructure.
| Traits | Traits type providing the types and constants used by the KnnGraph. Must have the same interface as the default traits type. |
Definition at line 44 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::DataPoint = typename Traits::DataPoint |
DataPoint given by user via Traits.
Definition at line 47 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::IndexContainer = typename Traits::IndexContainer |
Container for indices used inside the KdTree.
Definition at line 53 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::IndexType = typename Traits::IndexType |
Definition at line 51 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::KNearestIndexQuery = KnnGraphKNearestQuery<Traits> |
Definition at line 55 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::PointContainer = typename Traits::PointContainer |
Container for DataPoint used inside the KdTree.
Definition at line 52 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::RangeIndexQuery = KnnGraphRangeQuery<Traits> |
Definition at line 56 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::Scalar = typename DataPoint::Scalar |
Scalar given by user via DataPoint.
Definition at line 48 of file knnGraph.h.
| using Ponca::KnnGraphBase< Traits >::VectorType = typename DataPoint::VectorType |
VectorType given by user via DataPoint.
Definition at line 49 of file knnGraph.h.
|
inline |
Build a KnnGraph from a KdTreeDense.
| k | Number 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) |
Definition at line 71 of file knnGraph.h.
|
inlineprotected |
Definition at line 178 of file knnGraph.h.
|
inline |
Number of neighbor per vertex.
Definition at line 167 of file knnGraph.h.
|
inline |
Computes a Query object to iterate over the k-nearest neighbors of a point.
As k was set during the construction of the KnnGraphBase, it doesn't need to be provided.
The returned object can be reset and reused with the () operator, to compute a new result (also takes an index as parameter).
| index | Index of the point that the query evaluates |
Definition at line 117 of file knnGraph.h.
|
inline |
Convenience function that provides a k-nearest neighbors Query object.
Same as KnnGraphBase::kNearestNeighbors (0).
KdTreeBase::kNearestNeighborsIndexQuery, this function doesn't really return an empty query. This is due to the fact that the KnnGraphBase::kNearestNeighbors query can't set the k value to zero, as it is a value that is managed by the KnnGraphBase structure. Therefore, this function returns the k-nearest neighbors query made with the evaluation point set to 0.Definition at line 145 of file knnGraph.h.
|
inline |
Computes a Query object to iterate over the neighbors that are inside a given radius.
The returned object can be reset and reused with the () operator, to compute a new result (also takes an index and a radius as parameters).
| index | Index of the point that the query evaluates |
| r | Radius around where to search the neighbors |
Definition at line 129 of file knnGraph.h.
|
inline |
Convenience function that provides an empty range neighbors Query object.
The returned object can be called with the arguments (i, r) to fetch the neighbors that are in range r of the point of index i.
Same as KnnGraphBase::rangeNeighbors (0, 0).
Definition at line 159 of file knnGraph.h.
|
inline |
Number of vertices in the neighborhood graph.
Definition at line 169 of file knnGraph.h.
|
friend |
Definition at line 1 of file knnGraph.h.
|
friend |
Definition at line 1 of file knnGraph.h.
|
protected |
Definition at line 177 of file knnGraph.h.