![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <knncpp.h>
Public Member Functions | |
| QueryHeap (Index *indices, Scalar *distances, const size_t maxSize) | |
| void | push (const Index idx, const Scalar dist) |
| void | pop () |
| Scalar | front () const |
| bool | full () const |
| bool | empty () const |
| size_t | size () const |
| void | clear () |
| void | sort () |
Efficient heap structure to query nearest neighbours.
|
inline |
Creates a query heap with the given index and distance memory regions.
|
inline |
Clears the query heap.
References size_.
|
inline |
Determines if this query heap is empty.
References size_.
Referenced by knncpp::QueryHeap< Scalar >::front(), and knncpp::QueryHeap< Scalar >::pop().
|
inline |
Returns the distance of the element in front of the heap.
References knncpp::QueryHeap< Scalar >::empty().
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().
|
inline |
Determines if this query heap is full. The heap is considered full if its number of elements has reached its max size.
References size_.
Referenced by knncpp::QueryHeap< Scalar >::push(), knncpp::BruteForce< Scalar, Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().
|
inline |
Removes the element at the front of the heap and restores the heap order.
References knncpp::QueryHeap< Scalar >::empty(), and size_.
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), knncpp::MultiIndexHashing< Scalar >::query(), and knncpp::QueryHeap< Scalar >::sort().
|
inline |
Pushes a new query data set into the heap with the given index and distance. The index identifies the point for which the given distance was computed.
| idx | index / ID of the query point |
| dist | distance that was computed for the query point |
References knncpp::QueryHeap< Scalar >::full(), and size_.
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().
|
inline |
Returns the number of elements within the query heap.
References size_.
|
inline |
Sorts the elements within the heap according to their distance.
References knncpp::QueryHeap< Scalar >::pop(), and size_.
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), knncpp::KDTreeMinkowski< _Scalar, _Dimension, _Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().