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

#ifndef RCPP_extraDistr_RCPPEXPORTS_H_GEN_
#define RCPP_extraDistr_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace extraDistr {

    using namespace Rcpp;

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

    inline NumericVector cpp_dbern(const NumericVector& x, const NumericVector& prob, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbern)(SEXP,SEXP,SEXP);
        static Ptr_cpp_dbern p_cpp_dbern = NULL;
        if (p_cpp_dbern == NULL) {
            validateSignature("NumericVector(*cpp_dbern)(const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbern = (Ptr_cpp_dbern)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbern");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbern(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pbern(const NumericVector& x, const NumericVector& prob, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pbern)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pbern p_cpp_pbern = NULL;
        if (p_cpp_pbern == NULL) {
            validateSignature("NumericVector(*cpp_pbern)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pbern = (Ptr_cpp_pbern)R_GetCCallable("extraDistr", "_extraDistr_cpp_pbern");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pbern(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qbern(const NumericVector& p, const NumericVector& prob, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qbern)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qbern p_cpp_qbern = NULL;
        if (p_cpp_qbern == NULL) {
            validateSignature("NumericVector(*cpp_qbern)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qbern = (Ptr_cpp_qbern)R_GetCCallable("extraDistr", "_extraDistr_cpp_qbern");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qbern(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rbern(const int& n, const NumericVector& prob) {
        typedef SEXP(*Ptr_cpp_rbern)(SEXP,SEXP);
        static Ptr_cpp_rbern p_cpp_rbern = NULL;
        if (p_cpp_rbern == NULL) {
            validateSignature("NumericVector(*cpp_rbern)(const int&,const NumericVector&)");
            p_cpp_rbern = (Ptr_cpp_rbern)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbern");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbern(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbbinom(const NumericVector& x, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbbinom)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbbinom p_cpp_dbbinom = NULL;
        if (p_cpp_dbbinom == NULL) {
            validateSignature("NumericVector(*cpp_dbbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbbinom = (Ptr_cpp_dbbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pbbinom(const NumericVector& x, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pbbinom)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pbbinom p_cpp_pbbinom = NULL;
        if (p_cpp_pbbinom == NULL) {
            validateSignature("NumericVector(*cpp_pbbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pbbinom = (Ptr_cpp_pbbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_pbbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pbbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rbbinom(const int& n, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta) {
        typedef SEXP(*Ptr_cpp_rbbinom)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbbinom p_cpp_rbbinom = NULL;
        if (p_cpp_rbbinom == NULL) {
            validateSignature("NumericVector(*cpp_rbbinom)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbbinom = (Ptr_cpp_rbbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbbinom(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbnbinom(const NumericVector& x, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbnbinom)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbnbinom p_cpp_dbnbinom = NULL;
        if (p_cpp_dbnbinom == NULL) {
            validateSignature("NumericVector(*cpp_dbnbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbnbinom = (Ptr_cpp_dbnbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbnbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbnbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pbnbinom(const NumericVector& x, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pbnbinom)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pbnbinom p_cpp_pbnbinom = NULL;
        if (p_cpp_pbnbinom == NULL) {
            validateSignature("NumericVector(*cpp_pbnbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pbnbinom = (Ptr_cpp_pbnbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_pbnbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pbnbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rbnbinom(const int& n, const NumericVector& size, const NumericVector& alpha, const NumericVector& beta) {
        typedef SEXP(*Ptr_cpp_rbnbinom)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbnbinom p_cpp_rbnbinom = NULL;
        if (p_cpp_rbnbinom == NULL) {
            validateSignature("NumericVector(*cpp_rbnbinom)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbnbinom = (Ptr_cpp_rbnbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbnbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbnbinom(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbetapr(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbetapr)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbetapr p_cpp_dbetapr = NULL;
        if (p_cpp_dbetapr == NULL) {
            validateSignature("NumericVector(*cpp_dbetapr)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbetapr = (Ptr_cpp_dbetapr)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbetapr");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbetapr(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pbetapr(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pbetapr)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pbetapr p_cpp_pbetapr = NULL;
        if (p_cpp_pbetapr == NULL) {
            validateSignature("NumericVector(*cpp_pbetapr)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pbetapr = (Ptr_cpp_pbetapr)R_GetCCallable("extraDistr", "_extraDistr_cpp_pbetapr");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pbetapr(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qbetapr(const NumericVector& p, const NumericVector& alpha, const NumericVector& beta, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qbetapr)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qbetapr p_cpp_qbetapr = NULL;
        if (p_cpp_qbetapr == NULL) {
            validateSignature("NumericVector(*cpp_qbetapr)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qbetapr = (Ptr_cpp_qbetapr)R_GetCCallable("extraDistr", "_extraDistr_cpp_qbetapr");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qbetapr(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rbetapr(const int& n, const NumericVector& alpha, const NumericVector& beta, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rbetapr)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbetapr p_cpp_rbetapr = NULL;
        if (p_cpp_rbetapr == NULL) {
            validateSignature("NumericVector(*cpp_rbetapr)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbetapr = (Ptr_cpp_rbetapr)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbetapr");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbetapr(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbhatt(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& a, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbhatt)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbhatt p_cpp_dbhatt = NULL;
        if (p_cpp_dbhatt == NULL) {
            validateSignature("NumericVector(*cpp_dbhatt)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbhatt = (Ptr_cpp_dbhatt)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbhatt");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbhatt(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pbhatt(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& a, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pbhatt)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pbhatt p_cpp_pbhatt = NULL;
        if (p_cpp_pbhatt == NULL) {
            validateSignature("NumericVector(*cpp_pbhatt)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pbhatt = (Ptr_cpp_pbhatt)R_GetCCallable("extraDistr", "_extraDistr_cpp_pbhatt");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pbhatt(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rbhatt(const int& n, const NumericVector& mu, const NumericVector& sigma, const NumericVector& a) {
        typedef SEXP(*Ptr_cpp_rbhatt)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbhatt p_cpp_rbhatt = NULL;
        if (p_cpp_rbhatt == NULL) {
            validateSignature("NumericVector(*cpp_rbhatt)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbhatt = (Ptr_cpp_rbhatt)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbhatt");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbhatt(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(a)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dfatigue(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& mu, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dfatigue)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dfatigue p_cpp_dfatigue = NULL;
        if (p_cpp_dfatigue == NULL) {
            validateSignature("NumericVector(*cpp_dfatigue)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dfatigue = (Ptr_cpp_dfatigue)R_GetCCallable("extraDistr", "_extraDistr_cpp_dfatigue");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dfatigue(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pfatigue(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& mu, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pfatigue)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pfatigue p_cpp_pfatigue = NULL;
        if (p_cpp_pfatigue == NULL) {
            validateSignature("NumericVector(*cpp_pfatigue)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pfatigue = (Ptr_cpp_pfatigue)R_GetCCallable("extraDistr", "_extraDistr_cpp_pfatigue");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pfatigue(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qfatigue(const NumericVector& p, const NumericVector& alpha, const NumericVector& beta, const NumericVector& mu, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qfatigue)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qfatigue p_cpp_qfatigue = NULL;
        if (p_cpp_qfatigue == NULL) {
            validateSignature("NumericVector(*cpp_qfatigue)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qfatigue = (Ptr_cpp_qfatigue)R_GetCCallable("extraDistr", "_extraDistr_cpp_qfatigue");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qfatigue(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rfatigue(const int& n, const NumericVector& alpha, const NumericVector& beta, const NumericVector& mu) {
        typedef SEXP(*Ptr_cpp_rfatigue)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rfatigue p_cpp_rfatigue = NULL;
        if (p_cpp_rfatigue == NULL) {
            validateSignature("NumericVector(*cpp_rfatigue)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rfatigue = (Ptr_cpp_rfatigue)R_GetCCallable("extraDistr", "_extraDistr_cpp_rfatigue");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rfatigue(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(mu)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbnorm(const NumericVector& x, const NumericVector& y, const NumericVector& mu1, const NumericVector& mu2, const NumericVector& sigma1, const NumericVector& sigma2, const NumericVector& rho, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbnorm p_cpp_dbnorm = NULL;
        if (p_cpp_dbnorm == NULL) {
            validateSignature("NumericVector(*cpp_dbnorm)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbnorm = (Ptr_cpp_dbnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(mu1)), Shield<SEXP>(Rcpp::wrap(mu2)), Shield<SEXP>(Rcpp::wrap(sigma1)), Shield<SEXP>(Rcpp::wrap(sigma2)), Shield<SEXP>(Rcpp::wrap(rho)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rbnorm(const int& n, const NumericVector& mu1, const NumericVector& mu2, const NumericVector& sigma1, const NumericVector& sigma2, const NumericVector& rho) {
        typedef SEXP(*Ptr_cpp_rbnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbnorm p_cpp_rbnorm = NULL;
        if (p_cpp_rbnorm == NULL) {
            validateSignature("NumericMatrix(*cpp_rbnorm)(const int&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbnorm = (Ptr_cpp_rbnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbnorm(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu1)), Shield<SEXP>(Rcpp::wrap(mu2)), Shield<SEXP>(Rcpp::wrap(sigma1)), Shield<SEXP>(Rcpp::wrap(sigma2)), Shield<SEXP>(Rcpp::wrap(rho)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_dbpois(const NumericVector& x, const NumericVector& y, const NumericVector& a, const NumericVector& b, const NumericVector& c, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dbpois)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dbpois p_cpp_dbpois = NULL;
        if (p_cpp_dbpois == NULL) {
            validateSignature("NumericVector(*cpp_dbpois)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dbpois = (Ptr_cpp_dbpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_dbpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dbpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rbpois(const int& n, const NumericVector& a, const NumericVector& b, const NumericVector& c) {
        typedef SEXP(*Ptr_cpp_rbpois)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rbpois p_cpp_rbpois = NULL;
        if (p_cpp_rbpois == NULL) {
            validateSignature("NumericMatrix(*cpp_rbpois)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rbpois = (Ptr_cpp_rbpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_rbpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rbpois(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_rcatlp(const int& n, const NumericMatrix& log_prob) {
        typedef SEXP(*Ptr_cpp_rcatlp)(SEXP,SEXP);
        static Ptr_cpp_rcatlp p_cpp_rcatlp = NULL;
        if (p_cpp_rcatlp == NULL) {
            validateSignature("NumericVector(*cpp_rcatlp)(const int&,const NumericMatrix&)");
            p_cpp_rcatlp = (Ptr_cpp_rcatlp)R_GetCCallable("extraDistr", "_extraDistr_cpp_rcatlp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rcatlp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dcat(const NumericVector& x, const NumericMatrix& prob, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dcat)(SEXP,SEXP,SEXP);
        static Ptr_cpp_dcat p_cpp_dcat = NULL;
        if (p_cpp_dcat == NULL) {
            validateSignature("NumericVector(*cpp_dcat)(const NumericVector&,const NumericMatrix&,const bool&)");
            p_cpp_dcat = (Ptr_cpp_dcat)R_GetCCallable("extraDistr", "_extraDistr_cpp_dcat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dcat(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pcat(const NumericVector& x, const NumericMatrix& prob, bool lower_tail = true, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_pcat)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pcat p_cpp_pcat = NULL;
        if (p_cpp_pcat == NULL) {
            validateSignature("NumericVector(*cpp_pcat)(const NumericVector&,const NumericMatrix&,bool,bool)");
            p_cpp_pcat = (Ptr_cpp_pcat)R_GetCCallable("extraDistr", "_extraDistr_cpp_pcat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pcat(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qcat(const NumericVector& p, const NumericMatrix& prob, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qcat)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qcat p_cpp_qcat = NULL;
        if (p_cpp_qcat == NULL) {
            validateSignature("NumericVector(*cpp_qcat)(const NumericVector&,const NumericMatrix&,const bool&,const bool&)");
            p_cpp_qcat = (Ptr_cpp_qcat)R_GetCCallable("extraDistr", "_extraDistr_cpp_qcat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qcat(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rcat(const int& n, const NumericMatrix& prob) {
        typedef SEXP(*Ptr_cpp_rcat)(SEXP,SEXP);
        static Ptr_cpp_rcat p_cpp_rcat = NULL;
        if (p_cpp_rcat == NULL) {
            validateSignature("NumericVector(*cpp_rcat)(const int&,const NumericMatrix&)");
            p_cpp_rcat = (Ptr_cpp_rcat)R_GetCCallable("extraDistr", "_extraDistr_cpp_rcat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rcat(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddirichlet(const NumericMatrix& x, const NumericMatrix& alpha, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddirichlet)(SEXP,SEXP,SEXP);
        static Ptr_cpp_ddirichlet p_cpp_ddirichlet = NULL;
        if (p_cpp_ddirichlet == NULL) {
            validateSignature("NumericVector(*cpp_ddirichlet)(const NumericMatrix&,const NumericMatrix&,const bool&)");
            p_cpp_ddirichlet = (Ptr_cpp_ddirichlet)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddirichlet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddirichlet(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rdirichlet(const int& n, const NumericMatrix& alpha) {
        typedef SEXP(*Ptr_cpp_rdirichlet)(SEXP,SEXP);
        static Ptr_cpp_rdirichlet p_cpp_rdirichlet = NULL;
        if (p_cpp_rdirichlet == NULL) {
            validateSignature("NumericMatrix(*cpp_rdirichlet)(const int&,const NumericMatrix&)");
            p_cpp_rdirichlet = (Ptr_cpp_rdirichlet)R_GetCCallable("extraDistr", "_extraDistr_cpp_rdirichlet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rdirichlet(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddirmnom(const NumericMatrix& x, const NumericVector& size, const NumericMatrix& alpha, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddirmnom)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddirmnom p_cpp_ddirmnom = NULL;
        if (p_cpp_ddirmnom == NULL) {
            validateSignature("NumericVector(*cpp_ddirmnom)(const NumericMatrix&,const NumericVector&,const NumericMatrix&,const bool&)");
            p_cpp_ddirmnom = (Ptr_cpp_ddirmnom)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddirmnom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddirmnom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rdirmnom(const int& n, const NumericVector& size, const NumericMatrix& alpha) {
        typedef SEXP(*Ptr_cpp_rdirmnom)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rdirmnom p_cpp_rdirmnom = NULL;
        if (p_cpp_rdirmnom == NULL) {
            validateSignature("NumericMatrix(*cpp_rdirmnom)(const int&,const NumericVector&,const NumericMatrix&)");
            p_cpp_rdirmnom = (Ptr_cpp_rdirmnom)R_GetCCallable("extraDistr", "_extraDistr_cpp_rdirmnom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rdirmnom(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(alpha)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddgamma(const NumericVector& x, const NumericVector& shape, const NumericVector& scale, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddgamma)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddgamma p_cpp_ddgamma = NULL;
        if (p_cpp_ddgamma == NULL) {
            validateSignature("NumericVector(*cpp_ddgamma)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_ddgamma = (Ptr_cpp_ddgamma)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddgamma");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddgamma(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(shape)), Shield<SEXP>(Rcpp::wrap(scale)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddlaplace(const NumericVector& x, const NumericVector& location, const NumericVector& scale, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddlaplace)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddlaplace p_cpp_ddlaplace = NULL;
        if (p_cpp_ddlaplace == NULL) {
            validateSignature("NumericVector(*cpp_ddlaplace)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_ddlaplace = (Ptr_cpp_ddlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddlaplace(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(location)), Shield<SEXP>(Rcpp::wrap(scale)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pdlaplace(const NumericVector& x, const NumericVector& location, const NumericVector& scale, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pdlaplace)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pdlaplace p_cpp_pdlaplace = NULL;
        if (p_cpp_pdlaplace == NULL) {
            validateSignature("NumericVector(*cpp_pdlaplace)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pdlaplace = (Ptr_cpp_pdlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_pdlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pdlaplace(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(location)), Shield<SEXP>(Rcpp::wrap(scale)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rdlaplace(const int& n, const NumericVector& location, const NumericVector& scale) {
        typedef SEXP(*Ptr_cpp_rdlaplace)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rdlaplace p_cpp_rdlaplace = NULL;
        if (p_cpp_rdlaplace == NULL) {
            validateSignature("NumericVector(*cpp_rdlaplace)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rdlaplace = (Ptr_cpp_rdlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_rdlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rdlaplace(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(location)), Shield<SEXP>(Rcpp::wrap(scale)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddnorm(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddnorm)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddnorm p_cpp_ddnorm = NULL;
        if (p_cpp_ddnorm == NULL) {
            validateSignature("NumericVector(*cpp_ddnorm)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_ddnorm = (Ptr_cpp_ddnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddunif(const NumericVector& x, const NumericVector& min, const NumericVector& max, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddunif)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddunif p_cpp_ddunif = NULL;
        if (p_cpp_ddunif == NULL) {
            validateSignature("NumericVector(*cpp_ddunif)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_ddunif = (Ptr_cpp_ddunif)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddunif");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddunif(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pdunif(const NumericVector& x, const NumericVector& min, const NumericVector& max, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pdunif)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pdunif p_cpp_pdunif = NULL;
        if (p_cpp_pdunif == NULL) {
            validateSignature("NumericVector(*cpp_pdunif)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pdunif = (Ptr_cpp_pdunif)R_GetCCallable("extraDistr", "_extraDistr_cpp_pdunif");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pdunif(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qdunif(const NumericVector& p, const NumericVector& min, const NumericVector& max, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qdunif)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qdunif p_cpp_qdunif = NULL;
        if (p_cpp_qdunif == NULL) {
            validateSignature("NumericVector(*cpp_qdunif)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qdunif = (Ptr_cpp_qdunif)R_GetCCallable("extraDistr", "_extraDistr_cpp_qdunif");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qdunif(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rdunif(const int& n, const NumericVector& min, const NumericVector& max) {
        typedef SEXP(*Ptr_cpp_rdunif)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rdunif p_cpp_rdunif = NULL;
        if (p_cpp_rdunif == NULL) {
            validateSignature("NumericVector(*cpp_rdunif)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rdunif = (Ptr_cpp_rdunif)R_GetCCallable("extraDistr", "_extraDistr_cpp_rdunif");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rdunif(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ddweibull(const NumericVector& x, const NumericVector& q, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ddweibull)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ddweibull p_cpp_ddweibull = NULL;
        if (p_cpp_ddweibull == NULL) {
            validateSignature("NumericVector(*cpp_ddweibull)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_ddweibull = (Ptr_cpp_ddweibull)R_GetCCallable("extraDistr", "_extraDistr_cpp_ddweibull");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ddweibull(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(q)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pdweibull(const NumericVector& x, const NumericVector& q, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pdweibull)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pdweibull p_cpp_pdweibull = NULL;
        if (p_cpp_pdweibull == NULL) {
            validateSignature("NumericVector(*cpp_pdweibull)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pdweibull = (Ptr_cpp_pdweibull)R_GetCCallable("extraDistr", "_extraDistr_cpp_pdweibull");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pdweibull(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(q)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qdweibull(const NumericVector& p, const NumericVector& q, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qdweibull)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qdweibull p_cpp_qdweibull = NULL;
        if (p_cpp_qdweibull == NULL) {
            validateSignature("NumericVector(*cpp_qdweibull)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qdweibull = (Ptr_cpp_qdweibull)R_GetCCallable("extraDistr", "_extraDistr_cpp_qdweibull");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qdweibull(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(q)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rdweibull(const int& n, const NumericVector& q, const NumericVector& beta) {
        typedef SEXP(*Ptr_cpp_rdweibull)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rdweibull p_cpp_rdweibull = NULL;
        if (p_cpp_rdweibull == NULL) {
            validateSignature("NumericVector(*cpp_rdweibull)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rdweibull = (Ptr_cpp_rdweibull)R_GetCCallable("extraDistr", "_extraDistr_cpp_rdweibull");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rdweibull(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(q)), Shield<SEXP>(Rcpp::wrap(beta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dfrechet(const NumericVector& x, const NumericVector& lambda, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dfrechet)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dfrechet p_cpp_dfrechet = NULL;
        if (p_cpp_dfrechet == NULL) {
            validateSignature("NumericVector(*cpp_dfrechet)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dfrechet = (Ptr_cpp_dfrechet)R_GetCCallable("extraDistr", "_extraDistr_cpp_dfrechet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dfrechet(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pfrechet(const NumericVector& x, const NumericVector& lambda, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pfrechet)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pfrechet p_cpp_pfrechet = NULL;
        if (p_cpp_pfrechet == NULL) {
            validateSignature("NumericVector(*cpp_pfrechet)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pfrechet = (Ptr_cpp_pfrechet)R_GetCCallable("extraDistr", "_extraDistr_cpp_pfrechet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pfrechet(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qfrechet(const NumericVector& p, const NumericVector& lambda, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qfrechet)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qfrechet p_cpp_qfrechet = NULL;
        if (p_cpp_qfrechet == NULL) {
            validateSignature("NumericVector(*cpp_qfrechet)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qfrechet = (Ptr_cpp_qfrechet)R_GetCCallable("extraDistr", "_extraDistr_cpp_qfrechet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qfrechet(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rfrechet(const int& n, const NumericVector& lambda, const NumericVector& mu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rfrechet)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rfrechet p_cpp_rfrechet = NULL;
        if (p_cpp_rfrechet == NULL) {
            validateSignature("NumericVector(*cpp_rfrechet)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rfrechet = (Ptr_cpp_rfrechet)R_GetCCallable("extraDistr", "_extraDistr_cpp_rfrechet");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rfrechet(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dgpois(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dgpois)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dgpois p_cpp_dgpois = NULL;
        if (p_cpp_dgpois == NULL) {
            validateSignature("NumericVector(*cpp_dgpois)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dgpois = (Ptr_cpp_dgpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_dgpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dgpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pgpois(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pgpois)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pgpois p_cpp_pgpois = NULL;
        if (p_cpp_pgpois == NULL) {
            validateSignature("NumericVector(*cpp_pgpois)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pgpois = (Ptr_cpp_pgpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_pgpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pgpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rgpois(const int& n, const NumericVector& alpha, const NumericVector& beta) {
        typedef SEXP(*Ptr_cpp_rgpois)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rgpois p_cpp_rgpois = NULL;
        if (p_cpp_rgpois == NULL) {
            validateSignature("NumericVector(*cpp_rgpois)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rgpois = (Ptr_cpp_rgpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_rgpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rgpois(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dgev(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dgev)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dgev p_cpp_dgev = NULL;
        if (p_cpp_dgev == NULL) {
            validateSignature("NumericVector(*cpp_dgev)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dgev = (Ptr_cpp_dgev)R_GetCCallable("extraDistr", "_extraDistr_cpp_dgev");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dgev(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pgev(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, bool lower_tail = true, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_pgev)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pgev p_cpp_pgev = NULL;
        if (p_cpp_pgev == NULL) {
            validateSignature("NumericVector(*cpp_pgev)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,bool,bool)");
            p_cpp_pgev = (Ptr_cpp_pgev)R_GetCCallable("extraDistr", "_extraDistr_cpp_pgev");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pgev(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qgev(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, bool lower_tail = true, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_qgev)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qgev p_cpp_qgev = NULL;
        if (p_cpp_qgev == NULL) {
            validateSignature("NumericVector(*cpp_qgev)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,bool,bool)");
            p_cpp_qgev = (Ptr_cpp_qgev)R_GetCCallable("extraDistr", "_extraDistr_cpp_qgev");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qgev(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rgev(const int& n, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi) {
        typedef SEXP(*Ptr_cpp_rgev)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rgev p_cpp_rgev = NULL;
        if (p_cpp_rgev == NULL) {
            validateSignature("NumericVector(*cpp_rgev)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rgev = (Ptr_cpp_rgev)R_GetCCallable("extraDistr", "_extraDistr_cpp_rgev");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rgev(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dgompertz(const NumericVector& x, const NumericVector& a, const NumericVector& b, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_dgompertz)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dgompertz p_cpp_dgompertz = NULL;
        if (p_cpp_dgompertz == NULL) {
            validateSignature("NumericVector(*cpp_dgompertz)(const NumericVector&,const NumericVector&,const NumericVector&,bool)");
            p_cpp_dgompertz = (Ptr_cpp_dgompertz)R_GetCCallable("extraDistr", "_extraDistr_cpp_dgompertz");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dgompertz(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pgompertz(const NumericVector& x, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pgompertz)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pgompertz p_cpp_pgompertz = NULL;
        if (p_cpp_pgompertz == NULL) {
            validateSignature("NumericVector(*cpp_pgompertz)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pgompertz = (Ptr_cpp_pgompertz)R_GetCCallable("extraDistr", "_extraDistr_cpp_pgompertz");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pgompertz(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qgompertz(const NumericVector& p, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qgompertz)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qgompertz p_cpp_qgompertz = NULL;
        if (p_cpp_qgompertz == NULL) {
            validateSignature("NumericVector(*cpp_qgompertz)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qgompertz = (Ptr_cpp_qgompertz)R_GetCCallable("extraDistr", "_extraDistr_cpp_qgompertz");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qgompertz(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rgompertz(const int& n, const NumericVector& a, const NumericVector& b) {
        typedef SEXP(*Ptr_cpp_rgompertz)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rgompertz p_cpp_rgompertz = NULL;
        if (p_cpp_rgompertz == NULL) {
            validateSignature("NumericVector(*cpp_rgompertz)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rgompertz = (Ptr_cpp_rgompertz)R_GetCCallable("extraDistr", "_extraDistr_cpp_rgompertz");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rgompertz(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dgpd(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dgpd)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dgpd p_cpp_dgpd = NULL;
        if (p_cpp_dgpd == NULL) {
            validateSignature("NumericVector(*cpp_dgpd)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dgpd = (Ptr_cpp_dgpd)R_GetCCallable("extraDistr", "_extraDistr_cpp_dgpd");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dgpd(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pgpd(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pgpd)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pgpd p_cpp_pgpd = NULL;
        if (p_cpp_pgpd == NULL) {
            validateSignature("NumericVector(*cpp_pgpd)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pgpd = (Ptr_cpp_pgpd)R_GetCCallable("extraDistr", "_extraDistr_cpp_pgpd");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pgpd(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qgpd(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qgpd)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qgpd p_cpp_qgpd = NULL;
        if (p_cpp_qgpd == NULL) {
            validateSignature("NumericVector(*cpp_qgpd)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qgpd = (Ptr_cpp_qgpd)R_GetCCallable("extraDistr", "_extraDistr_cpp_qgpd");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qgpd(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rgpd(const int& n, const NumericVector& mu, const NumericVector& sigma, const NumericVector& xi) {
        typedef SEXP(*Ptr_cpp_rgpd)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rgpd p_cpp_rgpd = NULL;
        if (p_cpp_rgpd == NULL) {
            validateSignature("NumericVector(*cpp_rgpd)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rgpd = (Ptr_cpp_rgpd)R_GetCCallable("extraDistr", "_extraDistr_cpp_rgpd");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rgpd(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(xi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dgumbel(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dgumbel)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dgumbel p_cpp_dgumbel = NULL;
        if (p_cpp_dgumbel == NULL) {
            validateSignature("NumericVector(*cpp_dgumbel)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dgumbel = (Ptr_cpp_dgumbel)R_GetCCallable("extraDistr", "_extraDistr_cpp_dgumbel");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dgumbel(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pgumbel(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pgumbel)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pgumbel p_cpp_pgumbel = NULL;
        if (p_cpp_pgumbel == NULL) {
            validateSignature("NumericVector(*cpp_pgumbel)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pgumbel = (Ptr_cpp_pgumbel)R_GetCCallable("extraDistr", "_extraDistr_cpp_pgumbel");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pgumbel(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qgumbel(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qgumbel)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qgumbel p_cpp_qgumbel = NULL;
        if (p_cpp_qgumbel == NULL) {
            validateSignature("NumericVector(*cpp_qgumbel)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qgumbel = (Ptr_cpp_qgumbel)R_GetCCallable("extraDistr", "_extraDistr_cpp_qgumbel");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qgumbel(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rgumbel(const int& n, const NumericVector& mu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rgumbel)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rgumbel p_cpp_rgumbel = NULL;
        if (p_cpp_rgumbel == NULL) {
            validateSignature("NumericVector(*cpp_rgumbel)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rgumbel = (Ptr_cpp_rgumbel)R_GetCCallable("extraDistr", "_extraDistr_cpp_rgumbel");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rgumbel(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dhcauchy(const NumericVector& x, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dhcauchy)(SEXP,SEXP,SEXP);
        static Ptr_cpp_dhcauchy p_cpp_dhcauchy = NULL;
        if (p_cpp_dhcauchy == NULL) {
            validateSignature("NumericVector(*cpp_dhcauchy)(const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dhcauchy = (Ptr_cpp_dhcauchy)R_GetCCallable("extraDistr", "_extraDistr_cpp_dhcauchy");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dhcauchy(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_phcauchy(const NumericVector& x, const NumericVector& sigma, bool lower_tail = true, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_phcauchy)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_phcauchy p_cpp_phcauchy = NULL;
        if (p_cpp_phcauchy == NULL) {
            validateSignature("NumericVector(*cpp_phcauchy)(const NumericVector&,const NumericVector&,bool,bool)");
            p_cpp_phcauchy = (Ptr_cpp_phcauchy)R_GetCCallable("extraDistr", "_extraDistr_cpp_phcauchy");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_phcauchy(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qhcauchy(const NumericVector& p, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qhcauchy)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qhcauchy p_cpp_qhcauchy = NULL;
        if (p_cpp_qhcauchy == NULL) {
            validateSignature("NumericVector(*cpp_qhcauchy)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qhcauchy = (Ptr_cpp_qhcauchy)R_GetCCallable("extraDistr", "_extraDistr_cpp_qhcauchy");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qhcauchy(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rhcauchy(const int& n, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rhcauchy)(SEXP,SEXP);
        static Ptr_cpp_rhcauchy p_cpp_rhcauchy = NULL;
        if (p_cpp_rhcauchy == NULL) {
            validateSignature("NumericVector(*cpp_rhcauchy)(const int&,const NumericVector&)");
            p_cpp_rhcauchy = (Ptr_cpp_rhcauchy)R_GetCCallable("extraDistr", "_extraDistr_cpp_rhcauchy");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rhcauchy(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dhnorm(const NumericVector& x, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dhnorm)(SEXP,SEXP,SEXP);
        static Ptr_cpp_dhnorm p_cpp_dhnorm = NULL;
        if (p_cpp_dhnorm == NULL) {
            validateSignature("NumericVector(*cpp_dhnorm)(const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dhnorm = (Ptr_cpp_dhnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_dhnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dhnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_phnorm(const NumericVector& x, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_phnorm)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_phnorm p_cpp_phnorm = NULL;
        if (p_cpp_phnorm == NULL) {
            validateSignature("NumericVector(*cpp_phnorm)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_phnorm = (Ptr_cpp_phnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_phnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_phnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qhnorm(const NumericVector& p, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qhnorm)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qhnorm p_cpp_qhnorm = NULL;
        if (p_cpp_qhnorm == NULL) {
            validateSignature("NumericVector(*cpp_qhnorm)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qhnorm = (Ptr_cpp_qhnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_qhnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qhnorm(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rhnorm(const int& n, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rhnorm)(SEXP,SEXP);
        static Ptr_cpp_rhnorm p_cpp_rhnorm = NULL;
        if (p_cpp_rhnorm == NULL) {
            validateSignature("NumericVector(*cpp_rhnorm)(const int&,const NumericVector&)");
            p_cpp_rhnorm = (Ptr_cpp_rhnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_rhnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rhnorm(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dht(const NumericVector& x, const NumericVector& nu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dht)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dht p_cpp_dht = NULL;
        if (p_cpp_dht == NULL) {
            validateSignature("NumericVector(*cpp_dht)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dht = (Ptr_cpp_dht)R_GetCCallable("extraDistr", "_extraDistr_cpp_dht");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dht(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pht(const NumericVector& x, const NumericVector& nu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pht)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pht p_cpp_pht = NULL;
        if (p_cpp_pht == NULL) {
            validateSignature("NumericVector(*cpp_pht)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pht = (Ptr_cpp_pht)R_GetCCallable("extraDistr", "_extraDistr_cpp_pht");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pht(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qht(const NumericVector& p, const NumericVector& nu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qht)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qht p_cpp_qht = NULL;
        if (p_cpp_qht == NULL) {
            validateSignature("NumericVector(*cpp_qht)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qht = (Ptr_cpp_qht)R_GetCCallable("extraDistr", "_extraDistr_cpp_qht");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qht(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rht(const int& n, const NumericVector& nu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rht)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rht p_cpp_rht = NULL;
        if (p_cpp_rht == NULL) {
            validateSignature("NumericVector(*cpp_rht)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rht = (Ptr_cpp_rht)R_GetCCallable("extraDistr", "_extraDistr_cpp_rht");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rht(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dhuber(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& epsilon, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dhuber)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dhuber p_cpp_dhuber = NULL;
        if (p_cpp_dhuber == NULL) {
            validateSignature("NumericVector(*cpp_dhuber)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dhuber = (Ptr_cpp_dhuber)R_GetCCallable("extraDistr", "_extraDistr_cpp_dhuber");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dhuber(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(epsilon)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_phuber(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& epsilon, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_phuber)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_phuber p_cpp_phuber = NULL;
        if (p_cpp_phuber == NULL) {
            validateSignature("NumericVector(*cpp_phuber)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_phuber = (Ptr_cpp_phuber)R_GetCCallable("extraDistr", "_extraDistr_cpp_phuber");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_phuber(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(epsilon)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qhuber(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const NumericVector& epsilon, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qhuber)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qhuber p_cpp_qhuber = NULL;
        if (p_cpp_qhuber == NULL) {
            validateSignature("NumericVector(*cpp_qhuber)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qhuber = (Ptr_cpp_qhuber)R_GetCCallable("extraDistr", "_extraDistr_cpp_qhuber");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qhuber(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(epsilon)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rhuber(const int& n, const NumericVector& mu, const NumericVector& sigma, const NumericVector& epsilon) {
        typedef SEXP(*Ptr_cpp_rhuber)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rhuber p_cpp_rhuber = NULL;
        if (p_cpp_rhuber == NULL) {
            validateSignature("NumericVector(*cpp_rhuber)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rhuber = (Ptr_cpp_rhuber)R_GetCCallable("extraDistr", "_extraDistr_cpp_rhuber");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rhuber(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(epsilon)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dinvgamma(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dinvgamma)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dinvgamma p_cpp_dinvgamma = NULL;
        if (p_cpp_dinvgamma == NULL) {
            validateSignature("NumericVector(*cpp_dinvgamma)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dinvgamma = (Ptr_cpp_dinvgamma)R_GetCCallable("extraDistr", "_extraDistr_cpp_dinvgamma");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dinvgamma(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pinvgamma(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pinvgamma)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pinvgamma p_cpp_pinvgamma = NULL;
        if (p_cpp_pinvgamma == NULL) {
            validateSignature("NumericVector(*cpp_pinvgamma)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pinvgamma = (Ptr_cpp_pinvgamma)R_GetCCallable("extraDistr", "_extraDistr_cpp_pinvgamma");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pinvgamma(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dkumar(const NumericVector& x, const NumericVector& a, const NumericVector& b, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dkumar)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dkumar p_cpp_dkumar = NULL;
        if (p_cpp_dkumar == NULL) {
            validateSignature("NumericVector(*cpp_dkumar)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dkumar = (Ptr_cpp_dkumar)R_GetCCallable("extraDistr", "_extraDistr_cpp_dkumar");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dkumar(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pkumar(const NumericVector& x, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pkumar)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pkumar p_cpp_pkumar = NULL;
        if (p_cpp_pkumar == NULL) {
            validateSignature("NumericVector(*cpp_pkumar)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pkumar = (Ptr_cpp_pkumar)R_GetCCallable("extraDistr", "_extraDistr_cpp_pkumar");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pkumar(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qkumar(const NumericVector& p, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qkumar)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qkumar p_cpp_qkumar = NULL;
        if (p_cpp_qkumar == NULL) {
            validateSignature("NumericVector(*cpp_qkumar)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qkumar = (Ptr_cpp_qkumar)R_GetCCallable("extraDistr", "_extraDistr_cpp_qkumar");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qkumar(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rkumar(const int& n, const NumericVector& a, const NumericVector& b) {
        typedef SEXP(*Ptr_cpp_rkumar)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rkumar p_cpp_rkumar = NULL;
        if (p_cpp_rkumar == NULL) {
            validateSignature("NumericVector(*cpp_rkumar)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rkumar = (Ptr_cpp_rkumar)R_GetCCallable("extraDistr", "_extraDistr_cpp_rkumar");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rkumar(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dlaplace(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dlaplace)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dlaplace p_cpp_dlaplace = NULL;
        if (p_cpp_dlaplace == NULL) {
            validateSignature("NumericVector(*cpp_dlaplace)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dlaplace = (Ptr_cpp_dlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_dlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dlaplace(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_plaplace(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_plaplace)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_plaplace p_cpp_plaplace = NULL;
        if (p_cpp_plaplace == NULL) {
            validateSignature("NumericVector(*cpp_plaplace)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_plaplace = (Ptr_cpp_plaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_plaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_plaplace(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qlaplace(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qlaplace)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qlaplace p_cpp_qlaplace = NULL;
        if (p_cpp_qlaplace == NULL) {
            validateSignature("NumericVector(*cpp_qlaplace)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qlaplace = (Ptr_cpp_qlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_qlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qlaplace(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rlaplace(const int& n, const NumericVector& mu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rlaplace)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rlaplace p_cpp_rlaplace = NULL;
        if (p_cpp_rlaplace == NULL) {
            validateSignature("NumericVector(*cpp_rlaplace)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rlaplace = (Ptr_cpp_rlaplace)R_GetCCallable("extraDistr", "_extraDistr_cpp_rlaplace");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rlaplace(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dlst(const NumericVector& x, const NumericVector& nu, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dlst)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dlst p_cpp_dlst = NULL;
        if (p_cpp_dlst == NULL) {
            validateSignature("NumericVector(*cpp_dlst)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dlst = (Ptr_cpp_dlst)R_GetCCallable("extraDistr", "_extraDistr_cpp_dlst");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dlst(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_plst(const NumericVector& x, const NumericVector& nu, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_plst)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_plst p_cpp_plst = NULL;
        if (p_cpp_plst == NULL) {
            validateSignature("NumericVector(*cpp_plst)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_plst = (Ptr_cpp_plst)R_GetCCallable("extraDistr", "_extraDistr_cpp_plst");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_plst(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qlst(const NumericVector& p, const NumericVector& nu, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qlst)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qlst p_cpp_qlst = NULL;
        if (p_cpp_qlst == NULL) {
            validateSignature("NumericVector(*cpp_qlst)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qlst = (Ptr_cpp_qlst)R_GetCCallable("extraDistr", "_extraDistr_cpp_qlst");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qlst(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rlst(const int& n, const NumericVector& nu, const NumericVector& mu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rlst)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rlst p_cpp_rlst = NULL;
        if (p_cpp_rlst == NULL) {
            validateSignature("NumericVector(*cpp_rlst)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rlst = (Ptr_cpp_rlst)R_GetCCallable("extraDistr", "_extraDistr_cpp_rlst");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rlst(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(nu)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dlgser(const NumericVector& x, const NumericVector& theta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dlgser)(SEXP,SEXP,SEXP);
        static Ptr_cpp_dlgser p_cpp_dlgser = NULL;
        if (p_cpp_dlgser == NULL) {
            validateSignature("NumericVector(*cpp_dlgser)(const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dlgser = (Ptr_cpp_dlgser)R_GetCCallable("extraDistr", "_extraDistr_cpp_dlgser");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dlgser(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(theta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_plgser(const NumericVector& x, const NumericVector& theta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_plgser)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_plgser p_cpp_plgser = NULL;
        if (p_cpp_plgser == NULL) {
            validateSignature("NumericVector(*cpp_plgser)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_plgser = (Ptr_cpp_plgser)R_GetCCallable("extraDistr", "_extraDistr_cpp_plgser");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_plgser(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(theta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qlgser(const NumericVector& p, const NumericVector& theta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qlgser)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qlgser p_cpp_qlgser = NULL;
        if (p_cpp_qlgser == NULL) {
            validateSignature("NumericVector(*cpp_qlgser)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qlgser = (Ptr_cpp_qlgser)R_GetCCallable("extraDistr", "_extraDistr_cpp_qlgser");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qlgser(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(theta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rlgser(const int& n, const NumericVector& theta) {
        typedef SEXP(*Ptr_cpp_rlgser)(SEXP,SEXP);
        static Ptr_cpp_rlgser p_cpp_rlgser = NULL;
        if (p_cpp_rlgser == NULL) {
            validateSignature("NumericVector(*cpp_rlgser)(const int&,const NumericVector&)");
            p_cpp_rlgser = (Ptr_cpp_rlgser)R_GetCCallable("extraDistr", "_extraDistr_cpp_rlgser");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rlgser(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(theta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dlomax(const NumericVector& x, const NumericVector& lambda, const NumericVector& kappa, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dlomax)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dlomax p_cpp_dlomax = NULL;
        if (p_cpp_dlomax == NULL) {
            validateSignature("NumericVector(*cpp_dlomax)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dlomax = (Ptr_cpp_dlomax)R_GetCCallable("extraDistr", "_extraDistr_cpp_dlomax");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dlomax(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(kappa)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_plomax(const NumericVector& x, const NumericVector& lambda, const NumericVector& kappa, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_plomax)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_plomax p_cpp_plomax = NULL;
        if (p_cpp_plomax == NULL) {
            validateSignature("NumericVector(*cpp_plomax)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_plomax = (Ptr_cpp_plomax)R_GetCCallable("extraDistr", "_extraDistr_cpp_plomax");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_plomax(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(kappa)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qlomax(const NumericVector& p, const NumericVector& lambda, const NumericVector& kappa, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qlomax)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qlomax p_cpp_qlomax = NULL;
        if (p_cpp_qlomax == NULL) {
            validateSignature("NumericVector(*cpp_qlomax)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qlomax = (Ptr_cpp_qlomax)R_GetCCallable("extraDistr", "_extraDistr_cpp_qlomax");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qlomax(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(kappa)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rlomax(const int& n, const NumericVector& lambda, const NumericVector& kappa) {
        typedef SEXP(*Ptr_cpp_rlomax)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rlomax p_cpp_rlomax = NULL;
        if (p_cpp_rlomax == NULL) {
            validateSignature("NumericVector(*cpp_rlomax)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rlomax = (Ptr_cpp_rlomax)R_GetCCallable("extraDistr", "_extraDistr_cpp_rlomax");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rlomax(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dmixnorm(const NumericVector& x, const NumericMatrix& mu, const NumericMatrix& sigma, const NumericMatrix& alpha, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dmixnorm)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dmixnorm p_cpp_dmixnorm = NULL;
        if (p_cpp_dmixnorm == NULL) {
            validateSignature("NumericVector(*cpp_dmixnorm)(const NumericVector&,const NumericMatrix&,const NumericMatrix&,const NumericMatrix&,const bool&)");
            p_cpp_dmixnorm = (Ptr_cpp_dmixnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_dmixnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dmixnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pmixnorm(const NumericVector& x, const NumericMatrix& mu, const NumericMatrix& sigma, const NumericMatrix& alpha, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pmixnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pmixnorm p_cpp_pmixnorm = NULL;
        if (p_cpp_pmixnorm == NULL) {
            validateSignature("NumericVector(*cpp_pmixnorm)(const NumericVector&,const NumericMatrix&,const NumericMatrix&,const NumericMatrix&,const bool&,const bool&)");
            p_cpp_pmixnorm = (Ptr_cpp_pmixnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_pmixnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pmixnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rmixnorm(const int& n, const NumericMatrix& mu, const NumericMatrix& sigma, const NumericMatrix& alpha) {
        typedef SEXP(*Ptr_cpp_rmixnorm)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rmixnorm p_cpp_rmixnorm = NULL;
        if (p_cpp_rmixnorm == NULL) {
            validateSignature("NumericVector(*cpp_rmixnorm)(const int&,const NumericMatrix&,const NumericMatrix&,const NumericMatrix&)");
            p_cpp_rmixnorm = (Ptr_cpp_rmixnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_rmixnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rmixnorm(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(alpha)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dmixpois(const NumericVector& x, const NumericMatrix& lambda, const NumericMatrix& alpha, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dmixpois)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dmixpois p_cpp_dmixpois = NULL;
        if (p_cpp_dmixpois == NULL) {
            validateSignature("NumericVector(*cpp_dmixpois)(const NumericVector&,const NumericMatrix&,const NumericMatrix&,const bool&)");
            p_cpp_dmixpois = (Ptr_cpp_dmixpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_dmixpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dmixpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pmixpois(const NumericVector& x, const NumericMatrix& lambda, const NumericMatrix& alpha, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pmixpois)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pmixpois p_cpp_pmixpois = NULL;
        if (p_cpp_pmixpois == NULL) {
            validateSignature("NumericVector(*cpp_pmixpois)(const NumericVector&,const NumericMatrix&,const NumericMatrix&,const bool&,const bool&)");
            p_cpp_pmixpois = (Ptr_cpp_pmixpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_pmixpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pmixpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rmixpois(const int& n, const NumericMatrix& lambda, const NumericMatrix& alpha) {
        typedef SEXP(*Ptr_cpp_rmixpois)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rmixpois p_cpp_rmixpois = NULL;
        if (p_cpp_rmixpois == NULL) {
            validateSignature("NumericVector(*cpp_rmixpois)(const int&,const NumericMatrix&,const NumericMatrix&)");
            p_cpp_rmixpois = (Ptr_cpp_rmixpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_rmixpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rmixpois(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(alpha)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dmnom(const NumericMatrix& x, const NumericVector& size, const NumericMatrix& prob, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dmnom)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dmnom p_cpp_dmnom = NULL;
        if (p_cpp_dmnom == NULL) {
            validateSignature("NumericVector(*cpp_dmnom)(const NumericMatrix&,const NumericVector&,const NumericMatrix&,const bool&)");
            p_cpp_dmnom = (Ptr_cpp_dmnom)R_GetCCallable("extraDistr", "_extraDistr_cpp_dmnom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dmnom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rmnom(const int& n, const NumericVector& size, const NumericMatrix& prob) {
        typedef SEXP(*Ptr_cpp_rmnom)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rmnom p_cpp_rmnom = NULL;
        if (p_cpp_rmnom == NULL) {
            validateSignature("NumericMatrix(*cpp_rmnom)(const int&,const NumericVector&,const NumericMatrix&)");
            p_cpp_rmnom = (Ptr_cpp_rmnom)R_GetCCallable("extraDistr", "_extraDistr_cpp_rmnom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rmnom(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_dmvhyper(const NumericMatrix& x, const NumericMatrix& n, const NumericVector& k, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dmvhyper)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dmvhyper p_cpp_dmvhyper = NULL;
        if (p_cpp_dmvhyper == NULL) {
            validateSignature("NumericVector(*cpp_dmvhyper)(const NumericMatrix&,const NumericMatrix&,const NumericVector&,const bool&)");
            p_cpp_dmvhyper = (Ptr_cpp_dmvhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_dmvhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dmvhyper(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(k)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix cpp_rmvhyper(const int& nn, const NumericMatrix& n, const NumericVector& k) {
        typedef SEXP(*Ptr_cpp_rmvhyper)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rmvhyper p_cpp_rmvhyper = NULL;
        if (p_cpp_rmvhyper == NULL) {
            validateSignature("NumericMatrix(*cpp_rmvhyper)(const int&,const NumericMatrix&,const NumericVector&)");
            p_cpp_rmvhyper = (Ptr_cpp_rmvhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_rmvhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rmvhyper(Shield<SEXP>(Rcpp::wrap(nn)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(k)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector cpp_dnhyper(const NumericVector& x, const NumericVector& n, const NumericVector& m, const NumericVector& r, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dnhyper)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dnhyper p_cpp_dnhyper = NULL;
        if (p_cpp_dnhyper == NULL) {
            validateSignature("NumericVector(*cpp_dnhyper)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dnhyper = (Ptr_cpp_dnhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_dnhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dnhyper(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(r)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pnhyper(const NumericVector& x, const NumericVector& n, const NumericVector& m, const NumericVector& r, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pnhyper)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pnhyper p_cpp_pnhyper = NULL;
        if (p_cpp_pnhyper == NULL) {
            validateSignature("NumericVector(*cpp_pnhyper)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pnhyper = (Ptr_cpp_pnhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_pnhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pnhyper(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(r)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qnhyper(const NumericVector& p, const NumericVector& n, const NumericVector& m, const NumericVector& r, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qnhyper)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qnhyper p_cpp_qnhyper = NULL;
        if (p_cpp_qnhyper == NULL) {
            validateSignature("NumericVector(*cpp_qnhyper)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qnhyper = (Ptr_cpp_qnhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_qnhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qnhyper(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(r)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rnhyper(const int& nn, const NumericVector& n, const NumericVector& m, const NumericVector& r) {
        typedef SEXP(*Ptr_cpp_rnhyper)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rnhyper p_cpp_rnhyper = NULL;
        if (p_cpp_rnhyper == NULL) {
            validateSignature("NumericVector(*cpp_rnhyper)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rnhyper = (Ptr_cpp_rnhyper)R_GetCCallable("extraDistr", "_extraDistr_cpp_rnhyper");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rnhyper(Shield<SEXP>(Rcpp::wrap(nn)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(r)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dnsbeta(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& lower, const NumericVector& upper, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dnsbeta)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dnsbeta p_cpp_dnsbeta = NULL;
        if (p_cpp_dnsbeta == NULL) {
            validateSignature("NumericVector(*cpp_dnsbeta)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dnsbeta = (Ptr_cpp_dnsbeta)R_GetCCallable("extraDistr", "_extraDistr_cpp_dnsbeta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dnsbeta(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pnsbeta(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pnsbeta)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pnsbeta p_cpp_pnsbeta = NULL;
        if (p_cpp_pnsbeta == NULL) {
            validateSignature("NumericVector(*cpp_pnsbeta)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pnsbeta = (Ptr_cpp_pnsbeta)R_GetCCallable("extraDistr", "_extraDistr_cpp_pnsbeta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pnsbeta(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qnsbeta(const NumericVector& p, const NumericVector& alpha, const NumericVector& beta, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qnsbeta)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qnsbeta p_cpp_qnsbeta = NULL;
        if (p_cpp_qnsbeta == NULL) {
            validateSignature("NumericVector(*cpp_qnsbeta)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qnsbeta = (Ptr_cpp_qnsbeta)R_GetCCallable("extraDistr", "_extraDistr_cpp_qnsbeta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qnsbeta(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rnsbeta(const int& n, const NumericVector& alpha, const NumericVector& beta, const NumericVector& lower, const NumericVector& upper) {
        typedef SEXP(*Ptr_cpp_rnsbeta)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rnsbeta p_cpp_rnsbeta = NULL;
        if (p_cpp_rnsbeta == NULL) {
            validateSignature("NumericVector(*cpp_rnsbeta)(const int&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rnsbeta = (Ptr_cpp_rnsbeta)R_GetCCallable("extraDistr", "_extraDistr_cpp_rnsbeta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rnsbeta(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dpareto(const NumericVector& x, const NumericVector& a, const NumericVector& b, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dpareto)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dpareto p_cpp_dpareto = NULL;
        if (p_cpp_dpareto == NULL) {
            validateSignature("NumericVector(*cpp_dpareto)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dpareto = (Ptr_cpp_dpareto)R_GetCCallable("extraDistr", "_extraDistr_cpp_dpareto");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dpareto(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ppareto(const NumericVector& x, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ppareto)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ppareto p_cpp_ppareto = NULL;
        if (p_cpp_ppareto == NULL) {
            validateSignature("NumericVector(*cpp_ppareto)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ppareto = (Ptr_cpp_ppareto)R_GetCCallable("extraDistr", "_extraDistr_cpp_ppareto");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ppareto(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qpareto(const NumericVector& p, const NumericVector& a, const NumericVector& b, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qpareto)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qpareto p_cpp_qpareto = NULL;
        if (p_cpp_qpareto == NULL) {
            validateSignature("NumericVector(*cpp_qpareto)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qpareto = (Ptr_cpp_qpareto)R_GetCCallable("extraDistr", "_extraDistr_cpp_qpareto");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qpareto(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rpareto(const int& n, const NumericVector& a, const NumericVector& b) {
        typedef SEXP(*Ptr_cpp_rpareto)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rpareto p_cpp_rpareto = NULL;
        if (p_cpp_rpareto == NULL) {
            validateSignature("NumericVector(*cpp_rpareto)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rpareto = (Ptr_cpp_rpareto)R_GetCCallable("extraDistr", "_extraDistr_cpp_rpareto");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rpareto(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dpower(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dpower)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dpower p_cpp_dpower = NULL;
        if (p_cpp_dpower == NULL) {
            validateSignature("NumericVector(*cpp_dpower)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dpower = (Ptr_cpp_dpower)R_GetCCallable("extraDistr", "_extraDistr_cpp_dpower");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dpower(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ppower(const NumericVector& x, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ppower)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ppower p_cpp_ppower = NULL;
        if (p_cpp_ppower == NULL) {
            validateSignature("NumericVector(*cpp_ppower)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ppower = (Ptr_cpp_ppower)R_GetCCallable("extraDistr", "_extraDistr_cpp_ppower");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ppower(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qpower(const NumericVector& p, const NumericVector& alpha, const NumericVector& beta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qpower)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qpower p_cpp_qpower = NULL;
        if (p_cpp_qpower == NULL) {
            validateSignature("NumericVector(*cpp_qpower)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qpower = (Ptr_cpp_qpower)R_GetCCallable("extraDistr", "_extraDistr_cpp_qpower");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qpower(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rpower(const int& n, const NumericVector& alpha, const NumericVector& beta) {
        typedef SEXP(*Ptr_cpp_rpower)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rpower p_cpp_rpower = NULL;
        if (p_cpp_rpower == NULL) {
            validateSignature("NumericVector(*cpp_rpower)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rpower = (Ptr_cpp_rpower)R_GetCCallable("extraDistr", "_extraDistr_cpp_rpower");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rpower(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(beta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dprop(const NumericVector& x, const NumericVector& size, const NumericVector& mean, const NumericVector& prior, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dprop)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dprop p_cpp_dprop = NULL;
        if (p_cpp_dprop == NULL) {
            validateSignature("NumericVector(*cpp_dprop)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dprop = (Ptr_cpp_dprop)R_GetCCallable("extraDistr", "_extraDistr_cpp_dprop");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dprop(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(prior)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pprop(const NumericVector& x, const NumericVector& size, const NumericVector& mean, const NumericVector& prior, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pprop)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pprop p_cpp_pprop = NULL;
        if (p_cpp_pprop == NULL) {
            validateSignature("NumericVector(*cpp_pprop)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pprop = (Ptr_cpp_pprop)R_GetCCallable("extraDistr", "_extraDistr_cpp_pprop");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pprop(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(prior)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qprop(const NumericVector& p, const NumericVector& size, const NumericVector& mean, const NumericVector& prior, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qprop)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qprop p_cpp_qprop = NULL;
        if (p_cpp_qprop == NULL) {
            validateSignature("NumericVector(*cpp_qprop)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qprop = (Ptr_cpp_qprop)R_GetCCallable("extraDistr", "_extraDistr_cpp_qprop");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qprop(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(prior)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rprop(const int& n, const NumericVector& size, const NumericVector& mean, const NumericVector& prior) {
        typedef SEXP(*Ptr_cpp_rprop)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rprop p_cpp_rprop = NULL;
        if (p_cpp_rprop == NULL) {
            validateSignature("NumericVector(*cpp_rprop)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rprop = (Ptr_cpp_rprop)R_GetCCallable("extraDistr", "_extraDistr_cpp_rprop");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rprop(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(prior)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rsign(const int& n) {
        typedef SEXP(*Ptr_cpp_rsign)(SEXP);
        static Ptr_cpp_rsign p_cpp_rsign = NULL;
        if (p_cpp_rsign == NULL) {
            validateSignature("NumericVector(*cpp_rsign)(const int&)");
            p_cpp_rsign = (Ptr_cpp_rsign)R_GetCCallable("extraDistr", "_extraDistr_cpp_rsign");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rsign(Shield<SEXP>(Rcpp::wrap(n)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_drayleigh(const NumericVector& x, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_drayleigh)(SEXP,SEXP,SEXP);
        static Ptr_cpp_drayleigh p_cpp_drayleigh = NULL;
        if (p_cpp_drayleigh == NULL) {
            validateSignature("NumericVector(*cpp_drayleigh)(const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_drayleigh = (Ptr_cpp_drayleigh)R_GetCCallable("extraDistr", "_extraDistr_cpp_drayleigh");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_drayleigh(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_prayleigh(const NumericVector& x, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_prayleigh)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_prayleigh p_cpp_prayleigh = NULL;
        if (p_cpp_prayleigh == NULL) {
            validateSignature("NumericVector(*cpp_prayleigh)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_prayleigh = (Ptr_cpp_prayleigh)R_GetCCallable("extraDistr", "_extraDistr_cpp_prayleigh");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_prayleigh(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qrayleigh(const NumericVector& p, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qrayleigh)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qrayleigh p_cpp_qrayleigh = NULL;
        if (p_cpp_qrayleigh == NULL) {
            validateSignature("NumericVector(*cpp_qrayleigh)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qrayleigh = (Ptr_cpp_qrayleigh)R_GetCCallable("extraDistr", "_extraDistr_cpp_qrayleigh");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qrayleigh(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rrayleigh(const int& n, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rrayleigh)(SEXP,SEXP);
        static Ptr_cpp_rrayleigh p_cpp_rrayleigh = NULL;
        if (p_cpp_rrayleigh == NULL) {
            validateSignature("NumericVector(*cpp_rrayleigh)(const int&,const NumericVector&)");
            p_cpp_rrayleigh = (Ptr_cpp_rrayleigh)R_GetCCallable("extraDistr", "_extraDistr_cpp_rrayleigh");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rrayleigh(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dsgomp(const NumericVector& x, const NumericVector& b, const NumericVector& eta, bool log_prob = false) {
        typedef SEXP(*Ptr_cpp_dsgomp)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dsgomp p_cpp_dsgomp = NULL;
        if (p_cpp_dsgomp == NULL) {
            validateSignature("NumericVector(*cpp_dsgomp)(const NumericVector&,const NumericVector&,const NumericVector&,bool)");
            p_cpp_dsgomp = (Ptr_cpp_dsgomp)R_GetCCallable("extraDistr", "_extraDistr_cpp_dsgomp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dsgomp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(eta)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_psgomp(const NumericVector& x, const NumericVector& b, const NumericVector& eta, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_psgomp)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_psgomp p_cpp_psgomp = NULL;
        if (p_cpp_psgomp == NULL) {
            validateSignature("NumericVector(*cpp_psgomp)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_psgomp = (Ptr_cpp_psgomp)R_GetCCallable("extraDistr", "_extraDistr_cpp_psgomp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_psgomp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(eta)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rsgomp(const int& n, const NumericVector& b, const NumericVector& eta) {
        typedef SEXP(*Ptr_cpp_rsgomp)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rsgomp p_cpp_rsgomp = NULL;
        if (p_cpp_rsgomp == NULL) {
            validateSignature("NumericVector(*cpp_rsgomp)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rsgomp = (Ptr_cpp_rsgomp)R_GetCCallable("extraDistr", "_extraDistr_cpp_rsgomp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rsgomp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(eta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dskellam(const NumericVector& x, const NumericVector& mu1, const NumericVector& mu2, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dskellam)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dskellam p_cpp_dskellam = NULL;
        if (p_cpp_dskellam == NULL) {
            validateSignature("NumericVector(*cpp_dskellam)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dskellam = (Ptr_cpp_dskellam)R_GetCCallable("extraDistr", "_extraDistr_cpp_dskellam");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dskellam(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu1)), Shield<SEXP>(Rcpp::wrap(mu2)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rskellam(const int& n, const NumericVector& mu1, const NumericVector& mu2) {
        typedef SEXP(*Ptr_cpp_rskellam)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rskellam p_cpp_rskellam = NULL;
        if (p_cpp_rskellam == NULL) {
            validateSignature("NumericVector(*cpp_rskellam)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rskellam = (Ptr_cpp_rskellam)R_GetCCallable("extraDistr", "_extraDistr_cpp_rskellam");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rskellam(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu1)), Shield<SEXP>(Rcpp::wrap(mu2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dslash(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dslash)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dslash p_cpp_dslash = NULL;
        if (p_cpp_dslash == NULL) {
            validateSignature("NumericVector(*cpp_dslash)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dslash = (Ptr_cpp_dslash)R_GetCCallable("extraDistr", "_extraDistr_cpp_dslash");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dslash(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pslash(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pslash)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pslash p_cpp_pslash = NULL;
        if (p_cpp_pslash == NULL) {
            validateSignature("NumericVector(*cpp_pslash)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pslash = (Ptr_cpp_pslash)R_GetCCallable("extraDistr", "_extraDistr_cpp_pslash");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pslash(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rslash(const int& n, const NumericVector& mu, const NumericVector& sigma) {
        typedef SEXP(*Ptr_cpp_rslash)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rslash p_cpp_rslash = NULL;
        if (p_cpp_rslash == NULL) {
            validateSignature("NumericVector(*cpp_rslash)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rslash = (Ptr_cpp_rslash)R_GetCCallable("extraDistr", "_extraDistr_cpp_rslash");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rslash(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dtriang(const NumericVector& x, const NumericVector& a, const NumericVector& b, const NumericVector& c, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dtriang)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dtriang p_cpp_dtriang = NULL;
        if (p_cpp_dtriang == NULL) {
            validateSignature("NumericVector(*cpp_dtriang)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dtriang = (Ptr_cpp_dtriang)R_GetCCallable("extraDistr", "_extraDistr_cpp_dtriang");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dtriang(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ptriang(const NumericVector& x, const NumericVector& a, const NumericVector& b, const NumericVector& c, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ptriang)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ptriang p_cpp_ptriang = NULL;
        if (p_cpp_ptriang == NULL) {
            validateSignature("NumericVector(*cpp_ptriang)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ptriang = (Ptr_cpp_ptriang)R_GetCCallable("extraDistr", "_extraDistr_cpp_ptriang");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ptriang(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qtriang(const NumericVector& p, const NumericVector& a, const NumericVector& b, const NumericVector& c, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qtriang)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qtriang p_cpp_qtriang = NULL;
        if (p_cpp_qtriang == NULL) {
            validateSignature("NumericVector(*cpp_qtriang)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qtriang = (Ptr_cpp_qtriang)R_GetCCallable("extraDistr", "_extraDistr_cpp_qtriang");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qtriang(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rtriang(const int& n, const NumericVector& a, const NumericVector& b, const NumericVector& c) {
        typedef SEXP(*Ptr_cpp_rtriang)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rtriang p_cpp_rtriang = NULL;
        if (p_cpp_rtriang == NULL) {
            validateSignature("NumericVector(*cpp_rtriang)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rtriang = (Ptr_cpp_rtriang)R_GetCCallable("extraDistr", "_extraDistr_cpp_rtriang");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rtriang(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(c)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dtbinom(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& lower, const NumericVector& upper, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dtbinom)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dtbinom p_cpp_dtbinom = NULL;
        if (p_cpp_dtbinom == NULL) {
            validateSignature("NumericVector(*cpp_dtbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dtbinom = (Ptr_cpp_dtbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_dtbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dtbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ptbinom(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ptbinom)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ptbinom p_cpp_ptbinom = NULL;
        if (p_cpp_ptbinom == NULL) {
            validateSignature("NumericVector(*cpp_ptbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ptbinom = (Ptr_cpp_ptbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_ptbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ptbinom(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qtbinom(const NumericVector& p, const NumericVector& size, const NumericVector& prob, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qtbinom)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qtbinom p_cpp_qtbinom = NULL;
        if (p_cpp_qtbinom == NULL) {
            validateSignature("NumericVector(*cpp_qtbinom)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qtbinom = (Ptr_cpp_qtbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_qtbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qtbinom(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rtbinom(const int& n, const NumericVector& size, const NumericVector& prob, const NumericVector& lower, const NumericVector& upper) {
        typedef SEXP(*Ptr_cpp_rtbinom)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rtbinom p_cpp_rtbinom = NULL;
        if (p_cpp_rtbinom == NULL) {
            validateSignature("NumericVector(*cpp_rtbinom)(const int&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rtbinom = (Ptr_cpp_rtbinom)R_GetCCallable("extraDistr", "_extraDistr_cpp_rtbinom");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rtbinom(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dtnorm(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& lower, const NumericVector& upper, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dtnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dtnorm p_cpp_dtnorm = NULL;
        if (p_cpp_dtnorm == NULL) {
            validateSignature("NumericVector(*cpp_dtnorm)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dtnorm = (Ptr_cpp_dtnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_dtnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dtnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ptnorm(const NumericVector& x, const NumericVector& mu, const NumericVector& sigma, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ptnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ptnorm p_cpp_ptnorm = NULL;
        if (p_cpp_ptnorm == NULL) {
            validateSignature("NumericVector(*cpp_ptnorm)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ptnorm = (Ptr_cpp_ptnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_ptnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ptnorm(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qtnorm(const NumericVector& p, const NumericVector& mu, const NumericVector& sigma, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qtnorm)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qtnorm p_cpp_qtnorm = NULL;
        if (p_cpp_qtnorm == NULL) {
            validateSignature("NumericVector(*cpp_qtnorm)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qtnorm = (Ptr_cpp_qtnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_qtnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qtnorm(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rtnorm(const int& n, const NumericVector& mu, const NumericVector& sigma, const NumericVector& lower, const NumericVector& upper) {
        typedef SEXP(*Ptr_cpp_rtnorm)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rtnorm p_cpp_rtnorm = NULL;
        if (p_cpp_rtnorm == NULL) {
            validateSignature("NumericVector(*cpp_rtnorm)(const int&,const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rtnorm = (Ptr_cpp_rtnorm)R_GetCCallable("extraDistr", "_extraDistr_cpp_rtnorm");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rtnorm(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dtpois(const NumericVector& x, const NumericVector& lambda, const NumericVector& lower, const NumericVector& upper, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dtpois)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dtpois p_cpp_dtpois = NULL;
        if (p_cpp_dtpois == NULL) {
            validateSignature("NumericVector(*cpp_dtpois)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dtpois = (Ptr_cpp_dtpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_dtpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dtpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_ptpois(const NumericVector& x, const NumericVector& lambda, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_ptpois)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_ptpois p_cpp_ptpois = NULL;
        if (p_cpp_ptpois == NULL) {
            validateSignature("NumericVector(*cpp_ptpois)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_ptpois = (Ptr_cpp_ptpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_ptpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_ptpois(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qtpois(const NumericVector& p, const NumericVector& lambda, const NumericVector& lower, const NumericVector& upper, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qtpois)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qtpois p_cpp_qtpois = NULL;
        if (p_cpp_qtpois == NULL) {
            validateSignature("NumericVector(*cpp_qtpois)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qtpois = (Ptr_cpp_qtpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_qtpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qtpois(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rtpois(const int& n, const NumericVector& lambda, const NumericVector& lower, const NumericVector& upper) {
        typedef SEXP(*Ptr_cpp_rtpois)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rtpois p_cpp_rtpois = NULL;
        if (p_cpp_rtpois == NULL) {
            validateSignature("NumericVector(*cpp_rtpois)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rtpois = (Ptr_cpp_rtpois)R_GetCCallable("extraDistr", "_extraDistr_cpp_rtpois");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rtpois(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower)), Shield<SEXP>(Rcpp::wrap(upper)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qtlambda(const NumericVector& p, const NumericVector& lambda, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qtlambda)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qtlambda p_cpp_qtlambda = NULL;
        if (p_cpp_qtlambda == NULL) {
            validateSignature("NumericVector(*cpp_qtlambda)(const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qtlambda = (Ptr_cpp_qtlambda)R_GetCCallable("extraDistr", "_extraDistr_cpp_qtlambda");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qtlambda(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rtlambda(const int& n, const NumericVector& lambda) {
        typedef SEXP(*Ptr_cpp_rtlambda)(SEXP,SEXP);
        static Ptr_cpp_rtlambda p_cpp_rtlambda = NULL;
        if (p_cpp_rtlambda == NULL) {
            validateSignature("NumericVector(*cpp_rtlambda)(const int&,const NumericVector&)");
            p_cpp_rtlambda = (Ptr_cpp_rtlambda)R_GetCCallable("extraDistr", "_extraDistr_cpp_rtlambda");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rtlambda(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dwald(const NumericVector& x, const NumericVector& mu, const NumericVector& lambda, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dwald)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dwald p_cpp_dwald = NULL;
        if (p_cpp_dwald == NULL) {
            validateSignature("NumericVector(*cpp_dwald)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dwald = (Ptr_cpp_dwald)R_GetCCallable("extraDistr", "_extraDistr_cpp_dwald");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dwald(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pwald(const NumericVector& x, const NumericVector& mu, const NumericVector& lambda, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pwald)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pwald p_cpp_pwald = NULL;
        if (p_cpp_pwald == NULL) {
            validateSignature("NumericVector(*cpp_pwald)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pwald = (Ptr_cpp_pwald)R_GetCCallable("extraDistr", "_extraDistr_cpp_pwald");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pwald(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rwald(const int& n, const NumericVector& mu, const NumericVector& lambda) {
        typedef SEXP(*Ptr_cpp_rwald)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rwald p_cpp_rwald = NULL;
        if (p_cpp_rwald == NULL) {
            validateSignature("NumericVector(*cpp_rwald)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rwald = (Ptr_cpp_rwald)R_GetCCallable("extraDistr", "_extraDistr_cpp_rwald");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rwald(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(lambda)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dzib(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dzib)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dzib p_cpp_dzib = NULL;
        if (p_cpp_dzib == NULL) {
            validateSignature("NumericVector(*cpp_dzib)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dzib = (Ptr_cpp_dzib)R_GetCCallable("extraDistr", "_extraDistr_cpp_dzib");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dzib(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pzib(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pzib)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pzib p_cpp_pzib = NULL;
        if (p_cpp_pzib == NULL) {
            validateSignature("NumericVector(*cpp_pzib)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pzib = (Ptr_cpp_pzib)R_GetCCallable("extraDistr", "_extraDistr_cpp_pzib");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pzib(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qzib(const NumericVector& p, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qzib)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qzib p_cpp_qzib = NULL;
        if (p_cpp_qzib == NULL) {
            validateSignature("NumericVector(*cpp_qzib)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qzib = (Ptr_cpp_qzib)R_GetCCallable("extraDistr", "_extraDistr_cpp_qzib");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qzib(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rzib(const int& n, const NumericVector& size, const NumericVector& prob, const NumericVector& pi) {
        typedef SEXP(*Ptr_cpp_rzib)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rzib p_cpp_rzib = NULL;
        if (p_cpp_rzib == NULL) {
            validateSignature("NumericVector(*cpp_rzib)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rzib = (Ptr_cpp_rzib)R_GetCCallable("extraDistr", "_extraDistr_cpp_rzib");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rzib(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dzinb(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dzinb)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dzinb p_cpp_dzinb = NULL;
        if (p_cpp_dzinb == NULL) {
            validateSignature("NumericVector(*cpp_dzinb)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dzinb = (Ptr_cpp_dzinb)R_GetCCallable("extraDistr", "_extraDistr_cpp_dzinb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dzinb(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pzinb(const NumericVector& x, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pzinb)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pzinb p_cpp_pzinb = NULL;
        if (p_cpp_pzinb == NULL) {
            validateSignature("NumericVector(*cpp_pzinb)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pzinb = (Ptr_cpp_pzinb)R_GetCCallable("extraDistr", "_extraDistr_cpp_pzinb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pzinb(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qzinb(const NumericVector& p, const NumericVector& size, const NumericVector& prob, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qzinb)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qzinb p_cpp_qzinb = NULL;
        if (p_cpp_qzinb == NULL) {
            validateSignature("NumericVector(*cpp_qzinb)(const NumericVector&,const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qzinb = (Ptr_cpp_qzinb)R_GetCCallable("extraDistr", "_extraDistr_cpp_qzinb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qzinb(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rzinb(const int& n, const NumericVector& size, const NumericVector& prob, const NumericVector& pi) {
        typedef SEXP(*Ptr_cpp_rzinb)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_rzinb p_cpp_rzinb = NULL;
        if (p_cpp_rzinb == NULL) {
            validateSignature("NumericVector(*cpp_rzinb)(const int&,const NumericVector&,const NumericVector&,const NumericVector&)");
            p_cpp_rzinb = (Ptr_cpp_rzinb)R_GetCCallable("extraDistr", "_extraDistr_cpp_rzinb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rzinb(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(prob)), Shield<SEXP>(Rcpp::wrap(pi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_dzip(const NumericVector& x, const NumericVector& lambda, const NumericVector& pi, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_dzip)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_dzip p_cpp_dzip = NULL;
        if (p_cpp_dzip == NULL) {
            validateSignature("NumericVector(*cpp_dzip)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&)");
            p_cpp_dzip = (Ptr_cpp_dzip)R_GetCCallable("extraDistr", "_extraDistr_cpp_dzip");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_dzip(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_pzip(const NumericVector& x, const NumericVector& lambda, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_pzip)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_pzip p_cpp_pzip = NULL;
        if (p_cpp_pzip == NULL) {
            validateSignature("NumericVector(*cpp_pzip)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_pzip = (Ptr_cpp_pzip)R_GetCCallable("extraDistr", "_extraDistr_cpp_pzip");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_pzip(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_qzip(const NumericVector& p, const NumericVector& lambda, const NumericVector& pi, const bool& lower_tail = true, const bool& log_prob = false) {
        typedef SEXP(*Ptr_cpp_qzip)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_cpp_qzip p_cpp_qzip = NULL;
        if (p_cpp_qzip == NULL) {
            validateSignature("NumericVector(*cpp_qzip)(const NumericVector&,const NumericVector&,const NumericVector&,const bool&,const bool&)");
            p_cpp_qzip = (Ptr_cpp_qzip)R_GetCCallable("extraDistr", "_extraDistr_cpp_qzip");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_qzip(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(pi)), Shield<SEXP>(Rcpp::wrap(lower_tail)), Shield<SEXP>(Rcpp::wrap(log_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector cpp_rzip(const int& n, const NumericVector& lambda, const NumericVector& pi) {
        typedef SEXP(*Ptr_cpp_rzip)(SEXP,SEXP,SEXP);
        static Ptr_cpp_rzip p_cpp_rzip = NULL;
        if (p_cpp_rzip == NULL) {
            validateSignature("NumericVector(*cpp_rzip)(const int&,const NumericVector&,const NumericVector&)");
            p_cpp_rzip = (Ptr_cpp_rzip)R_GetCCallable("extraDistr", "_extraDistr_cpp_rzip");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cpp_rzip(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(pi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

}

#endif // RCPP_extraDistr_RCPPEXPORTS_H_GEN_
