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

#ifndef RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_
#define RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace PoissonBinomial {

    using namespace Rcpp;

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

    inline int vectorGCD(const IntegerVector x) {
        typedef SEXP(*Ptr_vectorGCD)(SEXP);
        static Ptr_vectorGCD p_vectorGCD = NULL;
        if (p_vectorGCD == NULL) {
            validateSignature("int(*vectorGCD)(const IntegerVector)");
            p_vectorGCD = (Ptr_vectorGCD)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_vectorGCD");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_vectorGCD(Shield<SEXP>(Rcpp::wrap(x)));
        }
        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<int >(rcpp_result_gen);
    }

    inline NumericVector dpb_conv(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_conv)(SEXP,SEXP);
        static Ptr_dpb_conv p_dpb_conv = NULL;
        if (p_dpb_conv == NULL) {
            validateSignature("NumericVector(*dpb_conv)(const IntegerVector,const NumericVector)");
            p_dpb_conv = (Ptr_dpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_conv(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_conv)(SEXP,SEXP,SEXP);
        static Ptr_ppb_conv p_ppb_conv = NULL;
        if (p_ppb_conv == NULL) {
            validateSignature("NumericVector(*ppb_conv)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_conv = (Ptr_ppb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_dc(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_dc)(SEXP,SEXP);
        static Ptr_dpb_dc p_dpb_dc = NULL;
        if (p_dpb_dc == NULL) {
            validateSignature("NumericVector(*dpb_dc)(const IntegerVector,const NumericVector)");
            p_dpb_dc = (Ptr_dpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_dc(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_dc)(SEXP,SEXP,SEXP);
        static Ptr_ppb_dc p_ppb_dc = NULL;
        if (p_ppb_dc == NULL) {
            validateSignature("NumericVector(*ppb_dc)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_dc = (Ptr_ppb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_dftcf(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_dftcf)(SEXP,SEXP);
        static Ptr_dpb_dftcf p_dpb_dftcf = NULL;
        if (p_dpb_dftcf == NULL) {
            validateSignature("NumericVector(*dpb_dftcf)(const IntegerVector,const NumericVector)");
            p_dpb_dftcf = (Ptr_dpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_dftcf(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_dftcf)(SEXP,SEXP,SEXP);
        static Ptr_ppb_dftcf p_ppb_dftcf = NULL;
        if (p_ppb_dftcf == NULL) {
            validateSignature("NumericVector(*ppb_dftcf)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_dftcf = (Ptr_ppb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_rf(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_rf)(SEXP,SEXP);
        static Ptr_dpb_rf p_dpb_rf = NULL;
        if (p_dpb_rf == NULL) {
            validateSignature("NumericVector(*dpb_rf)(const IntegerVector,const NumericVector)");
            p_dpb_rf = (Ptr_dpb_rf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_rf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_rf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_rf(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_rf)(SEXP,SEXP,SEXP);
        static Ptr_ppb_rf p_ppb_rf = NULL;
        if (p_ppb_rf == NULL) {
            validateSignature("NumericVector(*ppb_rf)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_rf = (Ptr_ppb_rf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_rf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_rf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_mean(IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_mean)(SEXP,SEXP);
        static Ptr_dpb_mean p_dpb_mean = NULL;
        if (p_dpb_mean == NULL) {
            validateSignature("NumericVector(*dpb_mean)(IntegerVector,const NumericVector)");
            p_dpb_mean = (Ptr_dpb_mean)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_mean");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_mean(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_mean(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_mean)(SEXP,SEXP,SEXP);
        static Ptr_ppb_mean p_ppb_mean = NULL;
        if (p_ppb_mean == NULL) {
            validateSignature("NumericVector(*ppb_mean)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_mean = (Ptr_ppb_mean)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_mean");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_mean(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_gmba(const IntegerVector obs, const NumericVector probs, const bool anti = false) {
        typedef SEXP(*Ptr_dpb_gmba)(SEXP,SEXP,SEXP);
        static Ptr_dpb_gmba p_dpb_gmba = NULL;
        if (p_dpb_gmba == NULL) {
            validateSignature("NumericVector(*dpb_gmba)(const IntegerVector,const NumericVector,const bool)");
            p_dpb_gmba = (Ptr_dpb_gmba)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_gmba");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_gmba(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(anti)));
        }
        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 ppb_gmba(const IntegerVector obs, const NumericVector probs, const bool anti = false, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_gmba)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_ppb_gmba p_ppb_gmba = NULL;
        if (p_ppb_gmba == NULL) {
            validateSignature("NumericVector(*ppb_gmba)(const IntegerVector,const NumericVector,const bool,const bool)");
            p_ppb_gmba = (Ptr_ppb_gmba)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_gmba");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_gmba(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(anti)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_pa(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_pa)(SEXP,SEXP);
        static Ptr_dpb_pa p_dpb_pa = NULL;
        if (p_dpb_pa == NULL) {
            validateSignature("NumericVector(*dpb_pa)(const IntegerVector,const NumericVector)");
            p_dpb_pa = (Ptr_dpb_pa)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_pa");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_pa(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 ppb_pa(const IntegerVector obs, const NumericVector probs, bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_pa)(SEXP,SEXP,SEXP);
        static Ptr_ppb_pa p_ppb_pa = NULL;
        if (p_ppb_pa == NULL) {
            validateSignature("NumericVector(*ppb_pa)(const IntegerVector,const NumericVector,bool)");
            p_ppb_pa = (Ptr_ppb_pa)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_pa");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_pa(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 ppb_na(const IntegerVector obs, const NumericVector probs, const bool refined = true, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_na)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_ppb_na p_ppb_na = NULL;
        if (p_ppb_na == NULL) {
            validateSignature("NumericVector(*ppb_na)(const IntegerVector,const NumericVector,const bool,const bool)");
            p_ppb_na = (Ptr_ppb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(refined)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dpb_na(const IntegerVector obs, const NumericVector probs, const bool refined = true) {
        typedef SEXP(*Ptr_dpb_na)(SEXP,SEXP,SEXP);
        static Ptr_dpb_na p_dpb_na = NULL;
        if (p_dpb_na == NULL) {
            validateSignature("NumericVector(*dpb_na)(const IntegerVector,const NumericVector,const bool)");
            p_dpb_na = (Ptr_dpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(refined)));
        }
        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 IntegerVector rpb_bernoulli(const int n, const NumericVector probs) {
        typedef SEXP(*Ptr_rpb_bernoulli)(SEXP,SEXP);
        static Ptr_rpb_bernoulli p_rpb_bernoulli = NULL;
        if (p_rpb_bernoulli == NULL) {
            validateSignature("IntegerVector(*rpb_bernoulli)(const int,const NumericVector)");
            p_rpb_bernoulli = (Ptr_rpb_bernoulli)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_rpb_bernoulli");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rpb_bernoulli(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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<IntegerVector >(rcpp_result_gen);
    }

    inline NumericVector dgpb_conv(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_conv)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_conv p_dgpb_conv = NULL;
        if (p_dgpb_conv == NULL) {
            validateSignature("NumericVector(*dgpb_conv)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_conv = (Ptr_dgpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 pgpb_conv(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_conv)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_conv p_pgpb_conv = NULL;
        if (p_pgpb_conv == NULL) {
            validateSignature("NumericVector(*pgpb_conv)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,bool)");
            p_pgpb_conv = (Ptr_pgpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dgpb_dc(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_dc)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_dc p_dgpb_dc = NULL;
        if (p_dgpb_dc == NULL) {
            validateSignature("NumericVector(*dgpb_dc)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_dc = (Ptr_dgpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 pgpb_dc(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_dc)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_dc p_pgpb_dc = NULL;
        if (p_pgpb_dc == NULL) {
            validateSignature("NumericVector(*pgpb_dc)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_pgpb_dc = (Ptr_pgpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dgpb_dftcf(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_dftcf)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_dftcf p_dgpb_dftcf = NULL;
        if (p_dgpb_dftcf == NULL) {
            validateSignature("NumericVector(*dgpb_dftcf)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_dftcf = (Ptr_dgpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 pgpb_dftcf(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_dftcf)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_dftcf p_pgpb_dftcf = NULL;
        if (p_pgpb_dftcf == NULL) {
            validateSignature("NumericVector(*pgpb_dftcf)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_pgpb_dftcf = (Ptr_pgpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 pgpb_na(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool refined = true, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_na)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_na p_pgpb_na = NULL;
        if (p_pgpb_na == NULL) {
            validateSignature("NumericVector(*pgpb_na)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool,const bool)");
            p_pgpb_na = (Ptr_pgpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(refined)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 dgpb_na(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool refined = true) {
        typedef SEXP(*Ptr_dgpb_na)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_na p_dgpb_na = NULL;
        if (p_dgpb_na == NULL) {
            validateSignature("NumericVector(*dgpb_na)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_dgpb_na = (Ptr_dgpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(refined)));
        }
        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 IntegerVector rgpb_bernoulli(const int n, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_rgpb_bernoulli)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_rgpb_bernoulli p_rgpb_bernoulli = NULL;
        if (p_rgpb_bernoulli == NULL) {
            validateSignature("IntegerVector(*rgpb_bernoulli)(const int,const NumericVector,const IntegerVector,const IntegerVector)");
            p_rgpb_bernoulli = (Ptr_rgpb_bernoulli)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_rgpb_bernoulli");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rgpb_bernoulli(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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<IntegerVector >(rcpp_result_gen);
    }

}

#endif // RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_
