// 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

// GMD
double GMD(NumericVector x);
RcppExport SEXP _SChangeBlock_GMD(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(GMD(x));
    return rcpp_result_gen;
END_RCPP
}
// Mu
NumericVector Mu(RObject x, Rcpp::Nullable<Rcpp::RObject> group, Rcpp::Nullable<Rcpp::IntegerVector> l);
RcppExport SEXP _SChangeBlock_Mu(SEXP xSEXP, SEXP groupSEXP, SEXP lSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< RObject >::type x(xSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::RObject> >::type group(groupSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type l(lSEXP);
    rcpp_result_gen = Rcpp::wrap(Mu(x, group, l));
    return rcpp_result_gen;
END_RCPP
}
// gamma
double gamma(NumericMatrix X, int h1, int h2);
RcppExport SEXP _SChangeBlock_gamma(SEXP XSEXP, SEXP h1SEXP, SEXP h2SEXP) {
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 h1(h1SEXP);
    Rcpp::traits::input_parameter< int >::type h2(h2SEXP);
    rcpp_result_gen = Rcpp::wrap(gamma(X, h1, h2));
    return rcpp_result_gen;
END_RCPP
}
// gammaDiff
double gammaDiff(NumericMatrix X, int h1, int h2);
RcppExport SEXP _SChangeBlock_gammaDiff(SEXP XSEXP, SEXP h1SEXP, SEXP h2SEXP) {
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 h1(h1SEXP);
    Rcpp::traits::input_parameter< int >::type h2(h2SEXP);
    rcpp_result_gen = Rcpp::wrap(gammaDiff(X, h1, h2));
    return rcpp_result_gen;
END_RCPP
}
// autocov
NumericMatrix autocov(NumericMatrix X, NumericVector b, IntegerVector M, int direction, int type);
RcppExport SEXP _SChangeBlock_autocov(SEXP XSEXP, SEXP bSEXP, SEXP MSEXP, SEXP directionSEXP, SEXP typeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type X(XSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type b(bSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type M(MSEXP);
    Rcpp::traits::input_parameter< int >::type direction(directionSEXP);
    Rcpp::traits::input_parameter< int >::type type(typeSEXP);
    rcpp_result_gen = Rcpp::wrap(autocov(X, b, M, direction, type));
    return rcpp_result_gen;
END_RCPP
}
// genTheta
NumericMatrix genTheta(int q, NumericVector param, String structure);
RcppExport SEXP _SChangeBlock_genTheta(SEXP qSEXP, SEXP paramSEXP, SEXP structureSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type q(qSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type param(paramSEXP);
    Rcpp::traits::input_parameter< String >::type structure(structureSEXP);
    rcpp_result_gen = Rcpp::wrap(genTheta(q, param, structure));
    return rcpp_result_gen;
END_RCPP
}
// dependency
NumericMatrix dependency(NumericMatrix E, Nullable<NumericMatrix> Theta_, Nullable<IntegerVector> q_, Nullable<NumericVector> param_);
RcppExport SEXP _SChangeBlock_dependency(SEXP ESEXP, SEXP Theta_SEXP, SEXP q_SEXP, SEXP param_SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type E(ESEXP);
    Rcpp::traits::input_parameter< Nullable<NumericMatrix> >::type Theta_(Theta_SEXP);
    Rcpp::traits::input_parameter< Nullable<IntegerVector> >::type q_(q_SEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type param_(param_SEXP);
    rcpp_result_gen = Rcpp::wrap(dependency(E, Theta_, q_, param_));
    return rcpp_result_gen;
END_RCPP
}
// sSizes
DataFrame sSizes(int n, double lower, double upper, double step);
RcppExport SEXP _SChangeBlock_sSizes(SEXP nSEXP, SEXP lowerSEXP, SEXP upperSEXP, SEXP stepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type lower(lowerSEXP);
    Rcpp::traits::input_parameter< double >::type upper(upperSEXP);
    Rcpp::traits::input_parameter< double >::type step(stepSEXP);
    rcpp_result_gen = Rcpp::wrap(sSizes(n, lower, upper, step));
    return rcpp_result_gen;
END_RCPP
}
// sOpt
NumericVector sOpt(IntegerVector n, double s);
RcppExport SEXP _SChangeBlock_sOpt(SEXP nSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type s(sSEXP);
    rcpp_result_gen = Rcpp::wrap(sOpt(n, s));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_SChangeBlock_GMD", (DL_FUNC) &_SChangeBlock_GMD, 1},
    {"_SChangeBlock_Mu", (DL_FUNC) &_SChangeBlock_Mu, 3},
    {"_SChangeBlock_gamma", (DL_FUNC) &_SChangeBlock_gamma, 3},
    {"_SChangeBlock_gammaDiff", (DL_FUNC) &_SChangeBlock_gammaDiff, 3},
    {"_SChangeBlock_autocov", (DL_FUNC) &_SChangeBlock_autocov, 5},
    {"_SChangeBlock_genTheta", (DL_FUNC) &_SChangeBlock_genTheta, 3},
    {"_SChangeBlock_dependency", (DL_FUNC) &_SChangeBlock_dependency, 4},
    {"_SChangeBlock_sSizes", (DL_FUNC) &_SChangeBlock_sSizes, 4},
    {"_SChangeBlock_sOpt", (DL_FUNC) &_SChangeBlock_sOpt, 2},
    {NULL, NULL, 0}
};

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