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

// fact
double fact(int i);
RcppExport SEXP _coconots_fact(SEXP iSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type i(iSEXP);
    rcpp_result_gen = Rcpp::wrap(fact(i));
    return rcpp_result_gen;
END_RCPP
}
// applyLinkFunction
double applyLinkFunction(double mathelp, std::string link_function);
RcppExport SEXP _coconots_applyLinkFunction(SEXP mathelpSEXP, SEXP link_functionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type mathelp(mathelpSEXP);
    Rcpp::traits::input_parameter< std::string >::type link_function(link_functionSEXP);
    rcpp_result_gen = Rcpp::wrap(applyLinkFunction(mathelp, link_function));
    return rcpp_result_gen;
END_RCPP
}
// innerProduct
double innerProduct(NumericVector x, NumericVector y);
RcppExport SEXP _coconots_innerProduct(SEXP xSEXP, SEXP ySEXP) {
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_result_gen = Rcpp::wrap(innerProduct(x, y));
    return rcpp_result_gen;
END_RCPP
}
// likelihoodGP2
double likelihoodGP2(double sumlimit, double lambda, double alpha1, double alpha2, double alpha3, double eta, int T, int seas1, int seas2, std::vector<int> data);
RcppExport SEXP _coconots_likelihoodGP2(SEXP sumlimitSEXP, SEXP lambdaSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP, SEXP TSEXP, SEXP seas1SEXP, SEXP seas2SEXP, SEXP dataSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type seas1(seas1SEXP);
    Rcpp::traits::input_parameter< int >::type seas2(seas2SEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    rcpp_result_gen = Rcpp::wrap(likelihoodGP2(sumlimit, lambda, alpha1, alpha2, alpha3, eta, T, seas1, seas2, data));
    return rcpp_result_gen;
END_RCPP
}
// likelihoodGP1
double likelihoodGP1(double sumlimit, double lambda, double alpha, double eta, int T, int seas, std::vector<int> data);
RcppExport SEXP _coconots_likelihoodGP1(SEXP sumlimitSEXP, SEXP lambdaSEXP, SEXP alphaSEXP, SEXP etaSEXP, SEXP TSEXP, SEXP seasSEXP, SEXP dataSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type seas(seasSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    rcpp_result_gen = Rcpp::wrap(likelihoodGP1(sumlimit, lambda, alpha, eta, T, seas, data));
    return rcpp_result_gen;
END_RCPP
}
// simGP2
std::vector<int> simGP2(double sumlimit, double lambda, double alpha1, double alpha2, double alpha3, double eta, int T, int N, int seas1, int seas2, std::vector<int> data, std::vector<double> uniform, std::vector<int> innovations);
RcppExport SEXP _coconots_simGP2(SEXP sumlimitSEXP, SEXP lambdaSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP, SEXP TSEXP, SEXP NSEXP, SEXP seas1SEXP, SEXP seas2SEXP, SEXP dataSEXP, SEXP uniformSEXP, SEXP innovationsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type seas1(seas1SEXP);
    Rcpp::traits::input_parameter< int >::type seas2(seas2SEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type uniform(uniformSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type innovations(innovationsSEXP);
    rcpp_result_gen = Rcpp::wrap(simGP2(sumlimit, lambda, alpha1, alpha2, alpha3, eta, T, N, seas1, seas2, data, uniform, innovations));
    return rcpp_result_gen;
END_RCPP
}
// simGP1
std::vector<int> simGP1(double sumlimit, double lambda, double alpha, double eta, int T, int N, int seas, std::vector<int> data, std::vector<double> uniform, std::vector<int> innovations);
RcppExport SEXP _coconots_simGP1(SEXP sumlimitSEXP, SEXP lambdaSEXP, SEXP alphaSEXP, SEXP etaSEXP, SEXP TSEXP, SEXP NSEXP, SEXP seasSEXP, SEXP dataSEXP, SEXP uniformSEXP, SEXP innovationsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type seas(seasSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type uniform(uniformSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type innovations(innovationsSEXP);
    rcpp_result_gen = Rcpp::wrap(simGP1(sumlimit, lambda, alpha, eta, T, N, seas, data, uniform, innovations));
    return rcpp_result_gen;
END_RCPP
}
// dGP2h
double dGP2h(int x, int y, int z, double lambda, double alpha1, double alpha2, double alpha3, double eta);
RcppExport SEXP _coconots_dGP2h(SEXP xSEXP, SEXP ySEXP, SEXP zSEXP, SEXP lambdaSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type y(ySEXP);
    Rcpp::traits::input_parameter< int >::type z(zSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    rcpp_result_gen = Rcpp::wrap(dGP2h(x, y, z, lambda, alpha1, alpha2, alpha3, eta));
    return rcpp_result_gen;
END_RCPP
}
// dGP1h
double dGP1h(int x, int y, double lambda, double alpha, double eta);
RcppExport SEXP _coconots_dGP1h(SEXP xSEXP, SEXP ySEXP, SEXP lambdaSEXP, SEXP alphaSEXP, SEXP etaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type y(ySEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    rcpp_result_gen = Rcpp::wrap(dGP1h(x, y, lambda, alpha, eta));
    return rcpp_result_gen;
END_RCPP
}
// dR2
double dR2(int r, int y, int z, double lambda, double alpha1, double alpha2, double alpha3, double eta);
RcppExport SEXP _coconots_dR2(SEXP rSEXP, SEXP ySEXP, SEXP zSEXP, SEXP lambdaSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type r(rSEXP);
    Rcpp::traits::input_parameter< int >::type y(ySEXP);
    Rcpp::traits::input_parameter< int >::type z(zSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    rcpp_result_gen = Rcpp::wrap(dR2(r, y, z, lambda, alpha1, alpha2, alpha3, eta));
    return rcpp_result_gen;
END_RCPP
}
// Pyz
double Pyz(int y, int z, double lambda, double alpha1, double alpha2, double alpha3, double eta);
RcppExport SEXP _coconots_Pyz(SEXP ySEXP, SEXP zSEXP, SEXP lambdaSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type y(ySEXP);
    Rcpp::traits::input_parameter< int >::type z(zSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    rcpp_result_gen = Rcpp::wrap(Pyz(y, z, lambda, alpha1, alpha2, alpha3, eta));
    return rcpp_result_gen;
END_RCPP
}
// simGP2cov
std::vector<int> simGP2cov(double sumlimit, double alpha1, double alpha2, double alpha3, double eta, NumericVector lambdas, int T, int N, int seas1, int seas2, std::vector<int> data, NumericMatrix xreg, std::vector<double> uniform, std::vector<int> innovations, std::string link_function);
RcppExport SEXP _coconots_simGP2cov(SEXP sumlimitSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP, SEXP lambdasSEXP, SEXP TSEXP, SEXP NSEXP, SEXP seas1SEXP, SEXP seas2SEXP, SEXP dataSEXP, SEXP xregSEXP, SEXP uniformSEXP, SEXP innovationsSEXP, SEXP link_functionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type seas1(seas1SEXP);
    Rcpp::traits::input_parameter< int >::type seas2(seas2SEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type xreg(xregSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type uniform(uniformSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type innovations(innovationsSEXP);
    Rcpp::traits::input_parameter< std::string >::type link_function(link_functionSEXP);
    rcpp_result_gen = Rcpp::wrap(simGP2cov(sumlimit, alpha1, alpha2, alpha3, eta, lambdas, T, N, seas1, seas2, data, xreg, uniform, innovations, link_function));
    return rcpp_result_gen;
END_RCPP
}
// simGP1cov
std::vector<int> simGP1cov(double sumlimit, double alpha, double eta, NumericVector lambdas, int T, int N, int seas, std::vector<int> data, NumericMatrix xreg, std::vector<double> uniform, std::vector<int> innovations, std::string link_function);
RcppExport SEXP _coconots_simGP1cov(SEXP sumlimitSEXP, SEXP alphaSEXP, SEXP etaSEXP, SEXP lambdasSEXP, SEXP TSEXP, SEXP NSEXP, SEXP seasSEXP, SEXP dataSEXP, SEXP xregSEXP, SEXP uniformSEXP, SEXP innovationsSEXP, SEXP link_functionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type seas(seasSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type xreg(xregSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type uniform(uniformSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type innovations(innovationsSEXP);
    Rcpp::traits::input_parameter< std::string >::type link_function(link_functionSEXP);
    rcpp_result_gen = Rcpp::wrap(simGP1cov(sumlimit, alpha, eta, lambdas, T, N, seas, data, xreg, uniform, innovations, link_function));
    return rcpp_result_gen;
END_RCPP
}
// likelihoodGP2cov
double likelihoodGP2cov(double sumlimit, double alpha1, double alpha2, double alpha3, double eta, NumericVector lambdas, int T, int seas1, int seas2, std::vector<int> data, NumericMatrix xreg, std::string link_function);
RcppExport SEXP _coconots_likelihoodGP2cov(SEXP sumlimitSEXP, SEXP alpha1SEXP, SEXP alpha2SEXP, SEXP alpha3SEXP, SEXP etaSEXP, SEXP lambdasSEXP, SEXP TSEXP, SEXP seas1SEXP, SEXP seas2SEXP, SEXP dataSEXP, SEXP xregSEXP, SEXP link_functionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type alpha1(alpha1SEXP);
    Rcpp::traits::input_parameter< double >::type alpha2(alpha2SEXP);
    Rcpp::traits::input_parameter< double >::type alpha3(alpha3SEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type seas1(seas1SEXP);
    Rcpp::traits::input_parameter< int >::type seas2(seas2SEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type xreg(xregSEXP);
    Rcpp::traits::input_parameter< std::string >::type link_function(link_functionSEXP);
    rcpp_result_gen = Rcpp::wrap(likelihoodGP2cov(sumlimit, alpha1, alpha2, alpha3, eta, lambdas, T, seas1, seas2, data, xreg, link_function));
    return rcpp_result_gen;
END_RCPP
}
// likelihoodGP1cov
double likelihoodGP1cov(double sumlimit, double alpha, double eta, NumericVector lambdas, int T, int seas, std::vector<int> data, NumericMatrix xreg, std::string link_function);
RcppExport SEXP _coconots_likelihoodGP1cov(SEXP sumlimitSEXP, SEXP alphaSEXP, SEXP etaSEXP, SEXP lambdasSEXP, SEXP TSEXP, SEXP seasSEXP, SEXP dataSEXP, SEXP xregSEXP, SEXP link_functionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sumlimit(sumlimitSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type eta(etaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< int >::type T(TSEXP);
    Rcpp::traits::input_parameter< int >::type seas(seasSEXP);
    Rcpp::traits::input_parameter< std::vector<int> >::type data(dataSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type xreg(xregSEXP);
    Rcpp::traits::input_parameter< std::string >::type link_function(link_functionSEXP);
    rcpp_result_gen = Rcpp::wrap(likelihoodGP1cov(sumlimit, alpha, eta, lambdas, T, seas, data, xreg, link_function));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_coconots_fact", (DL_FUNC) &_coconots_fact, 1},
    {"_coconots_applyLinkFunction", (DL_FUNC) &_coconots_applyLinkFunction, 2},
    {"_coconots_innerProduct", (DL_FUNC) &_coconots_innerProduct, 2},
    {"_coconots_likelihoodGP2", (DL_FUNC) &_coconots_likelihoodGP2, 10},
    {"_coconots_likelihoodGP1", (DL_FUNC) &_coconots_likelihoodGP1, 7},
    {"_coconots_simGP2", (DL_FUNC) &_coconots_simGP2, 13},
    {"_coconots_simGP1", (DL_FUNC) &_coconots_simGP1, 10},
    {"_coconots_dGP2h", (DL_FUNC) &_coconots_dGP2h, 8},
    {"_coconots_dGP1h", (DL_FUNC) &_coconots_dGP1h, 5},
    {"_coconots_dR2", (DL_FUNC) &_coconots_dR2, 8},
    {"_coconots_Pyz", (DL_FUNC) &_coconots_Pyz, 7},
    {"_coconots_simGP2cov", (DL_FUNC) &_coconots_simGP2cov, 15},
    {"_coconots_simGP1cov", (DL_FUNC) &_coconots_simGP1cov, 12},
    {"_coconots_likelihoodGP2cov", (DL_FUNC) &_coconots_likelihoodGP2cov, 12},
    {"_coconots_likelihoodGP1cov", (DL_FUNC) &_coconots_likelihoodGP1cov, 9},
    {NULL, NULL, 0}
};

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