Source header: cuvs/neighbors/ball_cover.hpp
Stores raw index data points, sampled landmarks, the 1-nns of index points
to their closest landmarks, and the ball radii of each landmark. This class is intended to be constructed once and reused across subsequent queries.
| 1 | template <typename idx_t, typename value_t> |
| 2 | struct index : cuvs::neighbors::index { |
| 3 | raft::resources const& handle; |
| 4 | int64_t m; |
| 5 | int64_t n; |
| 6 | int64_t n_landmarks; |
| 7 | raft::device_matrix_view<const float, idx_t, raft::row_major> X; |
| 8 | cuvs::distance::DistanceType metric; |
| 9 | }; |
Fields
| handle | raft::resources const& | |
| m | int64_t | |
| n | int64_t | |
| n_landmarks | int64_t | |
| X | raft::device_matrix_view<const float, idx_t, raft::row_major> | |
| metric | cuvs::distance::DistanceType |
Builds and populates a previously unbuilt cuvs::neighbors::ball_cover::index
| 1 | void build(raft::resources const& handle, index<int64_t, float>& index); |
Usage example:
Parameters
| handle | in | raft::resources const& | library resource management handle |
| index | inout | index<int64_t, float>& | an empty (and not previous built) instance of cuvs::neighbors::ball_cover::index |
Returns
void
Copyright © 2026, NVIDIA Corporation.