K-nearest neighbor search result container.
More...
#include <knn_result.hpp>
|
| | KnnResult (size_t *indices, double *distances, int num_neighbors=-1, const IndexTransform &index_transform=IndexTransform(), double max_sq_dist=std::numeric_limits< double >::max()) |
| | Constructor.
|
| |
|
size_t | buffer_size () const |
| | Buffer size (i.e., Maximum number of neighbors)
|
| |
|
size_t | num_found () const |
| | Number of found neighbors.
|
| |
|
double | worst_distance () const |
| | Worst distance in the result.
|
| |
|
void | push (size_t index, double distance) |
| | Push a pair of point index and distance to the result.
|
| |
|
|
const IndexTransform & | index_transform |
| |
|
const int | capacity |
| | Maximum number of neighbors to search.
|
| |
|
int | num_found_neighbors |
| | Number of found neighbors.
|
| |
|
size_t * | indices |
| | Indices of neighbors.
|
| |
|
double * | distances |
| | Distances to neighbors.
|
| |
|
|
static constexpr size_t | INVALID = std::numeric_limits<size_t>::max() |
| |
template<int N, typename IndexTransform = identity_transform>
struct gtsam_points::KnnResult< N, IndexTransform >
K-nearest neighbor search result container.
- Template Parameters
-
| N | Number of neighbors to search. If N == -1, the number of neighbors is dynamicaly determined. |
◆ KnnResult()
template<int N, typename IndexTransform = identity_transform>
| gtsam_points::KnnResult< N, IndexTransform >::KnnResult |
( |
size_t * |
indices, |
|
|
double * |
distances, |
|
|
int |
num_neighbors = -1, |
|
|
const IndexTransform & |
index_transform = IndexTransform(), |
|
|
double |
max_sq_dist = std::numeric_limits<double>::max() |
|
) |
| |
|
inlineexplicit |
Constructor.
- Parameters
-
| indices | Buffer to store indices (must be larger than k=max(N, num_neighbors)) |
| distances | Buffer to store distances (must be larger than k=max(N, num_neighbors)) |
| num_neighbors | Number of neighbors to search (must be -1 for static case N > 0) |
| index_transform | Index transformation function (e.g., local point index -> global voxel + point index) |
The documentation for this struct was generated from the following file:
- /home/runner/work/gtsam_points/gtsam_points/include/gtsam_points/ann/knn_result.hpp