// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include "../inst/include/BiocNeighbors.h"
#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// annoy_builder
SEXP annoy_builder(int num_trees, double search_mult, std::string distance);
RcppExport SEXP _BiocNeighbors_annoy_builder(SEXP num_treesSEXP, SEXP search_multSEXP, SEXP distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< int >::type num_trees(num_treesSEXP);
    Rcpp::traits::input_parameter< double >::type search_mult(search_multSEXP);
    Rcpp::traits::input_parameter< std::string >::type distance(distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(annoy_builder(num_trees, search_mult, distance));
    return rcpp_result_gen;
END_RCPP
}
// exhaustive_builder
SEXP exhaustive_builder(std::string distance);
RcppExport SEXP _BiocNeighbors_exhaustive_builder(SEXP distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< std::string >::type distance(distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(exhaustive_builder(distance));
    return rcpp_result_gen;
END_RCPP
}
// find_mutual_nns
Rcpp::List find_mutual_nns(Rcpp::IntegerMatrix left, Rcpp::IntegerMatrix right);
RcppExport SEXP _BiocNeighbors_find_mutual_nns(SEXP leftSEXP, SEXP rightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::IntegerMatrix >::type left(leftSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerMatrix >::type right(rightSEXP);
    rcpp_result_gen = Rcpp::wrap(find_mutual_nns(left, right));
    return rcpp_result_gen;
END_RCPP
}
// generic_build
SEXP generic_build(SEXP builder, Rcpp::NumericMatrix data);
RcppExport SEXP _BiocNeighbors_generic_build(SEXP builderSEXP, SEXP dataSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type builder(builderSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type data(dataSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_build(builder, data));
    return rcpp_result_gen;
END_RCPP
}
// generic_num_obs
int generic_num_obs(SEXP prebuilt_ptr);
RcppExport SEXP _BiocNeighbors_generic_num_obs(SEXP prebuilt_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type prebuilt_ptr(prebuilt_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_num_obs(prebuilt_ptr));
    return rcpp_result_gen;
END_RCPP
}
// generic_find_knn
SEXP generic_find_knn(SEXP prebuilt_ptr, Rcpp::IntegerVector num_neighbors, bool force_variable_neighbors, Rcpp::Nullable<Rcpp::IntegerVector> chosen, int num_threads, bool last_distance_only, bool report_index, bool report_distance);
RcppExport SEXP _BiocNeighbors_generic_find_knn(SEXP prebuilt_ptrSEXP, SEXP num_neighborsSEXP, SEXP force_variable_neighborsSEXP, SEXP chosenSEXP, SEXP num_threadsSEXP, SEXP last_distance_onlySEXP, SEXP report_indexSEXP, SEXP report_distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type prebuilt_ptr(prebuilt_ptrSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type num_neighbors(num_neighborsSEXP);
    Rcpp::traits::input_parameter< bool >::type force_variable_neighbors(force_variable_neighborsSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type chosen(chosenSEXP);
    Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
    Rcpp::traits::input_parameter< bool >::type last_distance_only(last_distance_onlySEXP);
    Rcpp::traits::input_parameter< bool >::type report_index(report_indexSEXP);
    Rcpp::traits::input_parameter< bool >::type report_distance(report_distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_find_knn(prebuilt_ptr, num_neighbors, force_variable_neighbors, chosen, num_threads, last_distance_only, report_index, report_distance));
    return rcpp_result_gen;
END_RCPP
}
// generic_query_knn
SEXP generic_query_knn(SEXP prebuilt_ptr, Rcpp::NumericMatrix query, Rcpp::IntegerVector num_neighbors, bool force_variable_neighbors, int num_threads, bool last_distance_only, bool report_index, bool report_distance);
RcppExport SEXP _BiocNeighbors_generic_query_knn(SEXP prebuilt_ptrSEXP, SEXP querySEXP, SEXP num_neighborsSEXP, SEXP force_variable_neighborsSEXP, SEXP num_threadsSEXP, SEXP last_distance_onlySEXP, SEXP report_indexSEXP, SEXP report_distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type prebuilt_ptr(prebuilt_ptrSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type query(querySEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type num_neighbors(num_neighborsSEXP);
    Rcpp::traits::input_parameter< bool >::type force_variable_neighbors(force_variable_neighborsSEXP);
    Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
    Rcpp::traits::input_parameter< bool >::type last_distance_only(last_distance_onlySEXP);
    Rcpp::traits::input_parameter< bool >::type report_index(report_indexSEXP);
    Rcpp::traits::input_parameter< bool >::type report_distance(report_distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_query_knn(prebuilt_ptr, query, num_neighbors, force_variable_neighbors, num_threads, last_distance_only, report_index, report_distance));
    return rcpp_result_gen;
END_RCPP
}
// generic_find_all
SEXP generic_find_all(SEXP prebuilt_ptr, Rcpp::Nullable<Rcpp::IntegerVector> chosen, Rcpp::NumericVector thresholds, int num_threads, bool report_index, bool report_distance);
RcppExport SEXP _BiocNeighbors_generic_find_all(SEXP prebuilt_ptrSEXP, SEXP chosenSEXP, SEXP thresholdsSEXP, SEXP num_threadsSEXP, SEXP report_indexSEXP, SEXP report_distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type prebuilt_ptr(prebuilt_ptrSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type chosen(chosenSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type thresholds(thresholdsSEXP);
    Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
    Rcpp::traits::input_parameter< bool >::type report_index(report_indexSEXP);
    Rcpp::traits::input_parameter< bool >::type report_distance(report_distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_find_all(prebuilt_ptr, chosen, thresholds, num_threads, report_index, report_distance));
    return rcpp_result_gen;
END_RCPP
}
// generic_query_all
SEXP generic_query_all(SEXP prebuilt_ptr, Rcpp::NumericMatrix query, Rcpp::NumericVector thresholds, int num_threads, bool report_index, bool report_distance);
RcppExport SEXP _BiocNeighbors_generic_query_all(SEXP prebuilt_ptrSEXP, SEXP querySEXP, SEXP thresholdsSEXP, SEXP num_threadsSEXP, SEXP report_indexSEXP, SEXP report_distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type prebuilt_ptr(prebuilt_ptrSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type query(querySEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type thresholds(thresholdsSEXP);
    Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
    Rcpp::traits::input_parameter< bool >::type report_index(report_indexSEXP);
    Rcpp::traits::input_parameter< bool >::type report_distance(report_distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(generic_query_all(prebuilt_ptr, query, thresholds, num_threads, report_index, report_distance));
    return rcpp_result_gen;
END_RCPP
}
// hnsw_builder
SEXP hnsw_builder(int nlinks, int ef_construct, int ef_search, std::string distance);
RcppExport SEXP _BiocNeighbors_hnsw_builder(SEXP nlinksSEXP, SEXP ef_constructSEXP, SEXP ef_searchSEXP, SEXP distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< int >::type nlinks(nlinksSEXP);
    Rcpp::traits::input_parameter< int >::type ef_construct(ef_constructSEXP);
    Rcpp::traits::input_parameter< int >::type ef_search(ef_searchSEXP);
    Rcpp::traits::input_parameter< std::string >::type distance(distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(hnsw_builder(nlinks, ef_construct, ef_search, distance));
    return rcpp_result_gen;
END_RCPP
}
// kmknn_builder
SEXP kmknn_builder(std::string distance);
RcppExport SEXP _BiocNeighbors_kmknn_builder(SEXP distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< std::string >::type distance(distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(kmknn_builder(distance));
    return rcpp_result_gen;
END_RCPP
}
// vptree_builder
SEXP vptree_builder(std::string distance);
RcppExport SEXP _BiocNeighbors_vptree_builder(SEXP distanceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< std::string >::type distance(distanceSEXP);
    rcpp_result_gen = Rcpp::wrap(vptree_builder(distance));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_BiocNeighbors_annoy_builder", (DL_FUNC) &_BiocNeighbors_annoy_builder, 3},
    {"_BiocNeighbors_exhaustive_builder", (DL_FUNC) &_BiocNeighbors_exhaustive_builder, 1},
    {"_BiocNeighbors_find_mutual_nns", (DL_FUNC) &_BiocNeighbors_find_mutual_nns, 2},
    {"_BiocNeighbors_generic_build", (DL_FUNC) &_BiocNeighbors_generic_build, 2},
    {"_BiocNeighbors_generic_num_obs", (DL_FUNC) &_BiocNeighbors_generic_num_obs, 1},
    {"_BiocNeighbors_generic_find_knn", (DL_FUNC) &_BiocNeighbors_generic_find_knn, 8},
    {"_BiocNeighbors_generic_query_knn", (DL_FUNC) &_BiocNeighbors_generic_query_knn, 8},
    {"_BiocNeighbors_generic_find_all", (DL_FUNC) &_BiocNeighbors_generic_find_all, 6},
    {"_BiocNeighbors_generic_query_all", (DL_FUNC) &_BiocNeighbors_generic_query_all, 6},
    {"_BiocNeighbors_hnsw_builder", (DL_FUNC) &_BiocNeighbors_hnsw_builder, 4},
    {"_BiocNeighbors_kmknn_builder", (DL_FUNC) &_BiocNeighbors_kmknn_builder, 1},
    {"_BiocNeighbors_vptree_builder", (DL_FUNC) &_BiocNeighbors_vptree_builder, 1},
    {NULL, NULL, 0}
};

RcppExport void R_init_BiocNeighbors(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
