19 #include <raft/distance/distance_types.hpp>
20 #include <raft/spatial/knn/ball_cover_types.hpp>
21 #include <raft/spatial/knn/detail/processing.hpp>
23 #include <cuvs/neighbors/ivf_flat.hpp>
24 #include <cuvs/neighbors/ivf_pq.hpp>
56 std::vector<float*>& input,
57 std::vector<int>& sizes,
64 bool rowMajorIndex =
false,
65 bool rowMajorQuery =
false,
66 raft::distance::DistanceType metric = raft::distance::DistanceType::L2Expanded,
67 float metric_arg = 2.0f,
68 std::vector<int64_t>* translations =
nullptr);
71 raft::spatial::knn::BallCoverIndex<int64_t, float, uint32_t>& index);
74 raft::spatial::knn::BallCoverIndex<int64_t, float, uint32_t>& index,
76 const float* search_items,
77 uint32_t n_search_items,
87 std::unique_ptr<cuvs::neighbors::ivf_flat::index<float, int64_t>>
ivf_flat;
88 std::unique_ptr<cuvs::neighbors::ivf_pq::index<int64_t>>
ivf_pq;
126 raft::distance::DistanceType metric,
169 int64_t* knn_indices,
170 std::vector<int*>& y,
191 int64_t* knn_indices,
192 std::vector<float*>& y,
212 std::vector<float*>& out,
213 int64_t* knn_indices,
214 std::vector<int*>& y,
Definition: params.hpp:34
Definition: dbscan.hpp:30
void knn_classify(raft::handle_t &handle, int *out, int64_t *knn_indices, std::vector< int * > &y, size_t n_index_rows, size_t n_query_rows, int k)
Flat C++ API function to perform a knn classification using a given a vector of label arrays....
void brute_force_knn(const raft::handle_t &handle, std::vector< float * > &input, std::vector< int > &sizes, int D, float *search_items, int n, int64_t *res_I, float *res_D, int k, bool rowMajorIndex=false, bool rowMajorQuery=false, raft::distance::DistanceType metric=raft::distance::DistanceType::L2Expanded, float metric_arg=2.0f, std::vector< int64_t > *translations=nullptr)
Flat C++ API function to perform a brute force knn on a series of input arrays and combine the result...
void knn_class_proba(raft::handle_t &handle, std::vector< float * > &out, int64_t *knn_indices, std::vector< int * > &y, size_t n_index_rows, size_t n_query_rows, int k)
Flat C++ API function to compute knn class probabilities using a vector of device arrays containing d...
void knn_regress(raft::handle_t &handle, float *out, int64_t *knn_indices, std::vector< float * > &y, size_t n_index_rows, size_t n_query_rows, int k)
Flat C++ API function to perform a knn regression using a given a vector of label arrays....
void approx_knn_search(raft::handle_t &handle, float *distances, int64_t *indices, knnIndex *index, int k, float *query_array, int n)
Flat C++ API function to perform an approximate nearest neighbors search from previously built index ...
void rbc_build_index(const raft::handle_t &handle, raft::spatial::knn::BallCoverIndex< int64_t, float, uint32_t > &index)
void rbc_knn_query(const raft::handle_t &handle, raft::spatial::knn::BallCoverIndex< int64_t, float, uint32_t > &index, uint32_t k, const float *search_items, uint32_t n_search_items, int64_t *out_inds, float *out_dists)
void approx_knn_build_index(raft::handle_t &handle, knnIndex *index, knnIndexParam *params, raft::distance::DistanceType metric, float metricArg, float *index_array, int n, int D)
Flat C++ API function to build an approximate nearest neighbors index from an index array and a set o...
Definition: dbscan.hpp:26
int M
Definition: knn.hpp:105
int n_bits
Definition: knn.hpp:106
bool usePrecomputedTables
Definition: knn.hpp:107
int nprobe
Definition: knn.hpp:99
int nlist
Definition: knn.hpp:98
virtual ~knnIndexParam()
Definition: knn.hpp:94
int nprobe
Definition: knn.hpp:84
int device
Definition: knn.hpp:90
std::unique_ptr< cuvs::neighbors::ivf_pq::index< int64_t > > ivf_pq
Definition: knn.hpp:88
float metricArg
Definition: knn.hpp:83
std::unique_ptr< cuvs::neighbors::ivf_flat::index< float, int64_t > > ivf_flat
Definition: knn.hpp:87
std::unique_ptr< raft::spatial::knn::MetricProcessor< float > > metric_processor
Definition: knn.hpp:85
raft::distance::DistanceType metric
Definition: knn.hpp:82