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

#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

// detector_create
SEXP detector_create(std::string type, Nullable<List> dim_indexes, Nullable<NumericVector> quantiles, int pruning_mult, int pruning_offset, std::string side, Nullable<NumericVector> anomaly_intensity, Nullable<NumericVector> rho, Nullable<NumericVector> mu0_arp);
RcppExport SEXP _focus_detector_create(SEXP typeSEXP, SEXP dim_indexesSEXP, SEXP quantilesSEXP, SEXP pruning_multSEXP, SEXP pruning_offsetSEXP, SEXP sideSEXP, SEXP anomaly_intensitySEXP, SEXP rhoSEXP, SEXP mu0_arpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
    Rcpp::traits::input_parameter< Nullable<List> >::type dim_indexes(dim_indexesSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type quantiles(quantilesSEXP);
    Rcpp::traits::input_parameter< int >::type pruning_mult(pruning_multSEXP);
    Rcpp::traits::input_parameter< int >::type pruning_offset(pruning_offsetSEXP);
    Rcpp::traits::input_parameter< std::string >::type side(sideSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type anomaly_intensity(anomaly_intensitySEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type rho(rhoSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type mu0_arp(mu0_arpSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_create(type, dim_indexes, quantiles, pruning_mult, pruning_offset, side, anomaly_intensity, rho, mu0_arp));
    return rcpp_result_gen;
END_RCPP
}
// detector_update
SEXP detector_update(SEXP det_ptr, NumericVector y, double lambda);
RcppExport SEXP _focus_detector_update(SEXP det_ptrSEXP, SEXP ySEXP, SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type y(ySEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_update(det_ptr, y, lambda));
    return rcpp_result_gen;
END_RCPP
}
// get_statistics
List get_statistics(SEXP det_ptr, std::string family, Nullable<NumericVector> theta0, Nullable<NumericVector> shape);
RcppExport SEXP _focus_get_statistics(SEXP det_ptrSEXP, SEXP familySEXP, SEXP theta0SEXP, SEXP shapeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type family(familySEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type theta0(theta0SEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type shape(shapeSEXP);
    rcpp_result_gen = Rcpp::wrap(get_statistics(det_ptr, family, theta0, shape));
    return rcpp_result_gen;
END_RCPP
}
// detector_pieces_len
int detector_pieces_len(SEXP det_ptr);
RcppExport SEXP _focus_detector_pieces_len(SEXP det_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_pieces_len(det_ptr));
    return rcpp_result_gen;
END_RCPP
}
// detector_info_n
int detector_info_n(SEXP det_ptr);
RcppExport SEXP _focus_detector_info_n(SEXP det_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_info_n(det_ptr));
    return rcpp_result_gen;
END_RCPP
}
// detector_info_sn
std::vector<double> detector_info_sn(SEXP det_ptr);
RcppExport SEXP _focus_detector_info_sn(SEXP det_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_info_sn(det_ptr));
    return rcpp_result_gen;
END_RCPP
}
// detector_candidates
List detector_candidates(SEXP det_ptr);
RcppExport SEXP _focus_detector_candidates(SEXP det_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type det_ptr(det_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(detector_candidates(det_ptr));
    return rcpp_result_gen;
END_RCPP
}
// generate_projection_indexes
std::vector<std::vector<int>> generate_projection_indexes(int d, int p);
RcppExport SEXP _focus_generate_projection_indexes(SEXP dSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type d(dSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(generate_projection_indexes(d, p));
    return rcpp_result_gen;
END_RCPP
}
// focus_offline
List focus_offline(SEXP Y, SEXP threshold, std::string type, std::string family, Nullable<NumericVector> theta0, Nullable<List> dim_indexes, Nullable<NumericVector> quantiles, int pruning_mult, int pruning_offset, std::string side, Nullable<NumericVector> shape, Nullable<NumericVector> anomaly_intensity, Nullable<NumericVector> rho, Nullable<NumericVector> mu0_arp);
RcppExport SEXP _focus_focus_offline(SEXP YSEXP, SEXP thresholdSEXP, SEXP typeSEXP, SEXP familySEXP, SEXP theta0SEXP, SEXP dim_indexesSEXP, SEXP quantilesSEXP, SEXP pruning_multSEXP, SEXP pruning_offsetSEXP, SEXP sideSEXP, SEXP shapeSEXP, SEXP anomaly_intensitySEXP, SEXP rhoSEXP, SEXP mu0_arpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type Y(YSEXP);
    Rcpp::traits::input_parameter< SEXP >::type threshold(thresholdSEXP);
    Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
    Rcpp::traits::input_parameter< std::string >::type family(familySEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type theta0(theta0SEXP);
    Rcpp::traits::input_parameter< Nullable<List> >::type dim_indexes(dim_indexesSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type quantiles(quantilesSEXP);
    Rcpp::traits::input_parameter< int >::type pruning_mult(pruning_multSEXP);
    Rcpp::traits::input_parameter< int >::type pruning_offset(pruning_offsetSEXP);
    Rcpp::traits::input_parameter< std::string >::type side(sideSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type shape(shapeSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type anomaly_intensity(anomaly_intensitySEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type rho(rhoSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type mu0_arp(mu0_arpSEXP);
    rcpp_result_gen = Rcpp::wrap(focus_offline(Y, threshold, type, family, theta0, dim_indexes, quantiles, pruning_mult, pruning_offset, side, shape, anomaly_intensity, rho, mu0_arp));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_focus_detector_create", (DL_FUNC) &_focus_detector_create, 9},
    {"_focus_detector_update", (DL_FUNC) &_focus_detector_update, 3},
    {"_focus_get_statistics", (DL_FUNC) &_focus_get_statistics, 4},
    {"_focus_detector_pieces_len", (DL_FUNC) &_focus_detector_pieces_len, 1},
    {"_focus_detector_info_n", (DL_FUNC) &_focus_detector_info_n, 1},
    {"_focus_detector_info_sn", (DL_FUNC) &_focus_detector_info_sn, 1},
    {"_focus_detector_candidates", (DL_FUNC) &_focus_detector_candidates, 1},
    {"_focus_generate_projection_indexes", (DL_FUNC) &_focus_generate_projection_indexes, 2},
    {"_focus_focus_offline", (DL_FUNC) &_focus_focus_offline, 14},
    {NULL, NULL, 0}
};

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