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

#include <RcppArmadillo.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

// generate_miaaft_surrogate_cpp
NumericMatrix generate_miaaft_surrogate_cpp(NumericMatrix x, int max_iter);
RcppExport SEXP _xiacf_generate_miaaft_surrogate_cpp(SEXP xSEXP, SEXP max_iterSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type max_iter(max_iterSEXP);
    rcpp_result_gen = Rcpp::wrap(generate_miaaft_surrogate_cpp(x, max_iter));
    return rcpp_result_gen;
END_RCPP
}
// compute_xi_ccf_miaaft
List compute_xi_ccf_miaaft(NumericVector x, NumericVector y, int max_lag, int n_surr);
RcppExport SEXP _xiacf_compute_xi_ccf_miaaft(SEXP xSEXP, SEXP ySEXP, SEXP max_lagSEXP, SEXP n_surrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type y(ySEXP);
    Rcpp::traits::input_parameter< int >::type max_lag(max_lagSEXP);
    Rcpp::traits::input_parameter< int >::type n_surr(n_surrSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_xi_ccf_miaaft(x, y, max_lag, n_surr));
    return rcpp_result_gen;
END_RCPP
}
// compute_xi_matrix_miaaft
List compute_xi_matrix_miaaft(NumericMatrix x, int max_lag, int n_surr);
RcppExport SEXP _xiacf_compute_xi_matrix_miaaft(SEXP xSEXP, SEXP max_lagSEXP, SEXP n_surrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type max_lag(max_lagSEXP);
    Rcpp::traits::input_parameter< int >::type n_surr(n_surrSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_xi_matrix_miaaft(x, max_lag, n_surr));
    return rcpp_result_gen;
END_RCPP
}
// xi_coefficient
double xi_coefficient(arma::vec x, arma::vec y);
RcppExport SEXP _xiacf_xi_coefficient(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type y(ySEXP);
    rcpp_result_gen = Rcpp::wrap(xi_coefficient(x, y));
    return rcpp_result_gen;
END_RCPP
}
// generate_iaaft_surrogates
arma::mat generate_iaaft_surrogates(arma::vec x, int n_surr, int max_iter);
RcppExport SEXP _xiacf_generate_iaaft_surrogates(SEXP xSEXP, SEXP n_surrSEXP, SEXP max_iterSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type n_surr(n_surrSEXP);
    Rcpp::traits::input_parameter< int >::type max_iter(max_iterSEXP);
    rcpp_result_gen = Rcpp::wrap(generate_iaaft_surrogates(x, n_surr, max_iter));
    return rcpp_result_gen;
END_RCPP
}
// compute_xi_acf_iaaft
List compute_xi_acf_iaaft(NumericVector x, int max_lag, int n_surr);
RcppExport SEXP _xiacf_compute_xi_acf_iaaft(SEXP xSEXP, SEXP max_lagSEXP, SEXP n_surrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type max_lag(max_lagSEXP);
    Rcpp::traits::input_parameter< int >::type n_surr(n_surrSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_xi_acf_iaaft(x, max_lag, n_surr));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_xiacf_generate_miaaft_surrogate_cpp", (DL_FUNC) &_xiacf_generate_miaaft_surrogate_cpp, 2},
    {"_xiacf_compute_xi_ccf_miaaft", (DL_FUNC) &_xiacf_compute_xi_ccf_miaaft, 4},
    {"_xiacf_compute_xi_matrix_miaaft", (DL_FUNC) &_xiacf_compute_xi_matrix_miaaft, 3},
    {"_xiacf_xi_coefficient", (DL_FUNC) &_xiacf_xi_coefficient, 2},
    {"_xiacf_generate_iaaft_surrogates", (DL_FUNC) &_xiacf_generate_iaaft_surrogates, 3},
    {"_xiacf_compute_xi_acf_iaaft", (DL_FUNC) &_xiacf_compute_xi_acf_iaaft, 3},
    {NULL, NULL, 0}
};

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