// This file was generated by Rcpp::compileAttributes
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#ifndef __Countr_RcppExports_h__
#define __Countr_RcppExports_h__

#include "Countr_types.h"
#include <RcppArmadillo.h>
#include <Rcpp.h>

namespace Countr {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("Countr", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("Countr", "Countr_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in Countr");
            }
        }
    }

    inline arma::vec dRenewalFrankCopula_user(arma::Col <unsigned> x, arma::Col <unsigned> y, Rcpp::Function survX, Rcpp::Function survY, Rcpp::List distParsX, Rcpp::List distParsY, Rcpp::List extrapolParsX, Rcpp::List extrapolParsY, double theta, double time = 1.0, bool logFlag = false, unsigned nsteps = 100, bool extrap = true) {
        typedef SEXP(*Ptr_dRenewalFrankCopula_user)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dRenewalFrankCopula_user p_dRenewalFrankCopula_user = NULL;
        if (p_dRenewalFrankCopula_user == NULL) {
            validateSignature("arma::vec(*dRenewalFrankCopula_user)(arma::Col <unsigned>,arma::Col <unsigned>,Rcpp::Function,Rcpp::Function,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,double,double,bool,unsigned,bool)");
            p_dRenewalFrankCopula_user = (Ptr_dRenewalFrankCopula_user)R_GetCCallable("Countr", "Countr_dRenewalFrankCopula_user");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dRenewalFrankCopula_user(Rcpp::wrap(x), Rcpp::wrap(y), Rcpp::wrap(survX), Rcpp::wrap(survY), Rcpp::wrap(distParsX), Rcpp::wrap(distParsY), Rcpp::wrap(extrapolParsX), Rcpp::wrap(extrapolParsY), Rcpp::wrap(theta), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(nsteps), Rcpp::wrap(extrap));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dRenewalFrankCopula_bi(arma::Col <unsigned> x, arma::Col <unsigned> y, const std::string distX, const std::string distY, Rcpp::List distParsX, Rcpp::List distParsY, double theta, double time = 1.0, bool logFlag = false, unsigned nsteps = 100, bool extrap = true) {
        typedef SEXP(*Ptr_dRenewalFrankCopula_bi)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dRenewalFrankCopula_bi p_dRenewalFrankCopula_bi = NULL;
        if (p_dRenewalFrankCopula_bi == NULL) {
            validateSignature("arma::vec(*dRenewalFrankCopula_bi)(arma::Col <unsigned>,arma::Col <unsigned>,const std::string,const std::string,Rcpp::List,Rcpp::List,double,double,bool,unsigned,bool)");
            p_dRenewalFrankCopula_bi = (Ptr_dRenewalFrankCopula_bi)R_GetCCallable("Countr", "Countr_dRenewalFrankCopula_bi");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dRenewalFrankCopula_bi(Rcpp::wrap(x), Rcpp::wrap(y), Rcpp::wrap(distX), Rcpp::wrap(distY), Rcpp::wrap(distParsX), Rcpp::wrap(distParsY), Rcpp::wrap(theta), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(nsteps), Rcpp::wrap(extrap));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullgammaCount_mat(arma::Col<unsigned> x, double shape, double r, double alpha, double time = 1.0, bool logFlag = false, unsigned jmax = 100) {
        typedef SEXP(*Ptr_dWeibullgammaCount_mat)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullgammaCount_mat p_dWeibullgammaCount_mat = NULL;
        if (p_dWeibullgammaCount_mat == NULL) {
            validateSignature("arma::vec(*dWeibullgammaCount_mat)(arma::Col<unsigned>,double,double,double,double,bool,unsigned)");
            p_dWeibullgammaCount_mat = (Ptr_dWeibullgammaCount_mat)R_GetCCallable("Countr", "Countr_dWeibullgammaCount_mat");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullgammaCount_mat(Rcpp::wrap(x), Rcpp::wrap(shape), Rcpp::wrap(r), Rcpp::wrap(alpha), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(jmax));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullgammaCount_mat_Covariates(arma::Col<unsigned> x, double cc, double r, double alpha, arma::mat Xcovar, arma::vec beta, double t = 1.0, bool logFlag = false, unsigned jmax = 100) {
        typedef SEXP(*Ptr_dWeibullgammaCount_mat_Covariates)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullgammaCount_mat_Covariates p_dWeibullgammaCount_mat_Covariates = NULL;
        if (p_dWeibullgammaCount_mat_Covariates == NULL) {
            validateSignature("arma::vec(*dWeibullgammaCount_mat_Covariates)(arma::Col<unsigned>,double,double,double,arma::mat,arma::vec,double,bool,unsigned)");
            p_dWeibullgammaCount_mat_Covariates = (Ptr_dWeibullgammaCount_mat_Covariates)R_GetCCallable("Countr", "Countr_dWeibullgammaCount_mat_Covariates");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullgammaCount_mat_Covariates(Rcpp::wrap(x), Rcpp::wrap(cc), Rcpp::wrap(r), Rcpp::wrap(alpha), Rcpp::wrap(Xcovar), Rcpp::wrap(beta), Rcpp::wrap(t), Rcpp::wrap(logFlag), Rcpp::wrap(jmax));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullgammaCount_acc(arma::Col<unsigned> x, double shape, double r, double alpha, double time = 1.0, bool logFlag = false, unsigned jmax = 100, int nmax = 300, double eps = 1e-10, bool printa = false) {
        typedef SEXP(*Ptr_dWeibullgammaCount_acc)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullgammaCount_acc p_dWeibullgammaCount_acc = NULL;
        if (p_dWeibullgammaCount_acc == NULL) {
            validateSignature("arma::vec(*dWeibullgammaCount_acc)(arma::Col<unsigned>,double,double,double,double,bool,unsigned,int,double,bool)");
            p_dWeibullgammaCount_acc = (Ptr_dWeibullgammaCount_acc)R_GetCCallable("Countr", "Countr_dWeibullgammaCount_acc");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullgammaCount_acc(Rcpp::wrap(x), Rcpp::wrap(shape), Rcpp::wrap(r), Rcpp::wrap(alpha), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(jmax), Rcpp::wrap(nmax), Rcpp::wrap(eps), Rcpp::wrap(printa));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullgammaCount_acc_Covariates(arma::Col<unsigned> x, double cc, double r, double alpha, arma::mat Xcovar, arma::vec beta, double t = 1.0, bool logFlag = false, unsigned jmax = 100, int nmax = 300, double eps = 1e-10, bool printa = false) {
        typedef SEXP(*Ptr_dWeibullgammaCount_acc_Covariates)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullgammaCount_acc_Covariates p_dWeibullgammaCount_acc_Covariates = NULL;
        if (p_dWeibullgammaCount_acc_Covariates == NULL) {
            validateSignature("arma::vec(*dWeibullgammaCount_acc_Covariates)(arma::Col<unsigned>,double,double,double,arma::mat,arma::vec,double,bool,unsigned,int,double,bool)");
            p_dWeibullgammaCount_acc_Covariates = (Ptr_dWeibullgammaCount_acc_Covariates)R_GetCCallable("Countr", "Countr_dWeibullgammaCount_acc_Covariates");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullgammaCount_acc_Covariates(Rcpp::wrap(x), Rcpp::wrap(cc), Rcpp::wrap(r), Rcpp::wrap(alpha), Rcpp::wrap(Xcovar), Rcpp::wrap(beta), Rcpp::wrap(t), Rcpp::wrap(logFlag), Rcpp::wrap(jmax), Rcpp::wrap(nmax), Rcpp::wrap(eps), Rcpp::wrap(printa));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::mat alphagen(double cc, unsigned jrow, unsigned ncol) {
        typedef SEXP(*Ptr_alphagen)(SEXP,SEXP,SEXP);
        static Ptr_alphagen p_alphagen = NULL;
        if (p_alphagen == NULL) {
            validateSignature("arma::mat(*alphagen)(double,unsigned,unsigned)");
            p_alphagen = (Ptr_alphagen)R_GetCCallable("Countr", "Countr_alphagen");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_alphagen(Rcpp::wrap(cc), Rcpp::wrap(jrow), Rcpp::wrap(ncol));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::mat >(__result);
    }

    inline arma::vec dWeibullCount_mat(arma::Col<unsigned> x, double shape, double scale, double time = 1.0, bool logFlag = false, unsigned jmax = 50) {
        typedef SEXP(*Ptr_dWeibullCount_mat)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullCount_mat p_dWeibullCount_mat = NULL;
        if (p_dWeibullCount_mat == NULL) {
            validateSignature("arma::vec(*dWeibullCount_mat)(arma::Col<unsigned>,double,double,double,bool,unsigned)");
            p_dWeibullCount_mat = (Ptr_dWeibullCount_mat)R_GetCCallable("Countr", "Countr_dWeibullCount_mat");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullCount_mat(Rcpp::wrap(x), Rcpp::wrap(shape), Rcpp::wrap(scale), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(jmax));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullCount_acc(arma::Col<unsigned> x, double shape, double scale, double time = 1.0, bool logFlag = false, unsigned jmax = 50, int nmax = 300, double eps = 1e-10, bool printa = false) {
        typedef SEXP(*Ptr_dWeibullCount_acc)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullCount_acc p_dWeibullCount_acc = NULL;
        if (p_dWeibullCount_acc == NULL) {
            validateSignature("arma::vec(*dWeibullCount_acc)(arma::Col<unsigned>,double,double,double,bool,unsigned,int,double,bool)");
            p_dWeibullCount_acc = (Ptr_dWeibullCount_acc)R_GetCCallable("Countr", "Countr_dWeibullCount_acc");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullCount_acc(Rcpp::wrap(x), Rcpp::wrap(shape), Rcpp::wrap(scale), Rcpp::wrap(time), Rcpp::wrap(logFlag), Rcpp::wrap(jmax), Rcpp::wrap(nmax), Rcpp::wrap(eps), Rcpp::wrap(printa));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullInterArrivalCountFrankCopula(arma::Col <unsigned> x, arma::Col <unsigned> y, arma::vec shapeX, arma::vec shapeY, arma::vec scaleX, arma::vec scaleY, double theta, double t, bool logFlag, unsigned jmax, int nmax, double eps) {
        typedef SEXP(*Ptr_dWeibullInterArrivalCountFrankCopula)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullInterArrivalCountFrankCopula p_dWeibullInterArrivalCountFrankCopula = NULL;
        if (p_dWeibullInterArrivalCountFrankCopula == NULL) {
            validateSignature("arma::vec(*dWeibullInterArrivalCountFrankCopula)(arma::Col <unsigned>,arma::Col <unsigned>,arma::vec,arma::vec,arma::vec,arma::vec,double,double,bool,unsigned,int,double)");
            p_dWeibullInterArrivalCountFrankCopula = (Ptr_dWeibullInterArrivalCountFrankCopula)R_GetCCallable("Countr", "Countr_dWeibullInterArrivalCountFrankCopula");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullInterArrivalCountFrankCopula(Rcpp::wrap(x), Rcpp::wrap(y), Rcpp::wrap(shapeX), Rcpp::wrap(shapeY), Rcpp::wrap(scaleX), Rcpp::wrap(scaleY), Rcpp::wrap(theta), Rcpp::wrap(t), Rcpp::wrap(logFlag), Rcpp::wrap(jmax), Rcpp::wrap(nmax), Rcpp::wrap(eps));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

    inline arma::vec dWeibullInterArrivalCountFrankCopula_uni(arma::Col <unsigned> x, arma::Col <unsigned> y, double shapeX, double shapeY, arma::vec scaleX, arma::vec scaleY, double theta, double t, bool logFlag, unsigned jmax, int nmax, double eps) {
        typedef SEXP(*Ptr_dWeibullInterArrivalCountFrankCopula_uni)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dWeibullInterArrivalCountFrankCopula_uni p_dWeibullInterArrivalCountFrankCopula_uni = NULL;
        if (p_dWeibullInterArrivalCountFrankCopula_uni == NULL) {
            validateSignature("arma::vec(*dWeibullInterArrivalCountFrankCopula_uni)(arma::Col <unsigned>,arma::Col <unsigned>,double,double,arma::vec,arma::vec,double,double,bool,unsigned,int,double)");
            p_dWeibullInterArrivalCountFrankCopula_uni = (Ptr_dWeibullInterArrivalCountFrankCopula_uni)R_GetCCallable("Countr", "Countr_dWeibullInterArrivalCountFrankCopula_uni");
        }
        RObject __result;
        {
            RNGScope __rngScope;
            __result = p_dWeibullInterArrivalCountFrankCopula_uni(Rcpp::wrap(x), Rcpp::wrap(y), Rcpp::wrap(shapeX), Rcpp::wrap(shapeY), Rcpp::wrap(scaleX), Rcpp::wrap(scaleY), Rcpp::wrap(theta), Rcpp::wrap(t), Rcpp::wrap(logFlag), Rcpp::wrap(jmax), Rcpp::wrap(nmax), Rcpp::wrap(eps));
        }
        if (__result.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (__result.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(__result).c_str());
        return Rcpp::as<arma::vec >(__result);
    }

}

#endif // __Countr_RcppExports_h__
