![]() |
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 |
|
inline |
|
inline |
Determines if this query heap is empty.
Definition at line 334 of file knncpp.h.
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.
Definition at line 321 of file knncpp.h.
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.
Definition at line 330 of file knncpp.h.
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.
Definition at line 294 of file knncpp.h.
References dist(), 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 |
Definition at line 271 of file knncpp.h.
References dist(), knncpp::QueryHeap< Scalar >::full(), and size_.
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().
|
inline |
|
inline |
Sorts the elements within the heap according to their distance.
Definition at line 345 of file knncpp.h.
References dist(), knncpp::QueryHeap< Scalar >::pop(), and size_.
Referenced by knncpp::BruteForce< Scalar, Distance >::query(), knncpp::KDTreeMinkowski< _Scalar, _Dimension, _Distance >::query(), and knncpp::MultiIndexHashing< Scalar >::query().