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

#ifndef RCPP_bnmr_RCPPEXPORTS_H_GEN_
#define RCPP_bnmr_RCPPEXPORTS_H_GEN_

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

namespace bnmr {

    using namespace Rcpp;

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

    inline double rtnormc(double a, double b) {
        typedef SEXP(*Ptr_rtnormc)(SEXP,SEXP);
        static Ptr_rtnormc p_rtnormc = NULL;
        if (p_rtnormc == NULL) {
            validateSignature("double(*rtnormc)(double,double)");
            p_rtnormc = (Ptr_rtnormc)R_GetCCallable("bnmr", "_bnmr_rtnormc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rtnormc(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<double >(rcpp_result_gen);
    }

    inline arma::vec rtmvnormc(arma::vec m, arma::mat V, arma::vec w, int n) {
        typedef SEXP(*Ptr_rtmvnormc)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_rtmvnormc p_rtmvnormc = NULL;
        if (p_rtmvnormc == NULL) {
            validateSignature("arma::vec(*rtmvnormc)(arma::vec,arma::mat,arma::vec,int)");
            p_rtmvnormc = (Ptr_rtmvnormc)R_GetCCallable("bnmr", "_bnmr_rtmvnormc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rtmvnormc(Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(V)), Shield<SEXP>(Rcpp::wrap(w)), 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<arma::vec >(rcpp_result_gen);
    }

    inline double updatealpha(double alpha, arma::vec nc, double alpha_a, double alpha_b, int M) {
        typedef SEXP(*Ptr_updatealpha)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_updatealpha p_updatealpha = NULL;
        if (p_updatealpha == NULL) {
            validateSignature("double(*updatealpha)(double,arma::vec,double,double,int)");
            p_updatealpha = (Ptr_updatealpha)R_GetCCallable("bnmr", "_bnmr_updatealpha");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_updatealpha(Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(nc)), Shield<SEXP>(Rcpp::wrap(alpha_a)), Shield<SEXP>(Rcpp::wrap(alpha_b)), Shield<SEXP>(Rcpp::wrap(M)));
        }
        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<double >(rcpp_result_gen);
    }

    inline List betatothetaandS(arma::vec beta) {
        typedef SEXP(*Ptr_betatothetaandS)(SEXP);
        static Ptr_betatothetaandS p_betatothetaandS = NULL;
        if (p_betatothetaandS == NULL) {
            validateSignature("List(*betatothetaandS)(arma::vec)");
            p_betatothetaandS = (Ptr_betatothetaandS)R_GetCCallable("bnmr", "_bnmr_betatothetaandS");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_betatothetaandS(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<List >(rcpp_result_gen);
    }

    inline double updatebeta(arma::vec y, arma::mat BA, arma::vec beta, arma::vec nc, arma::vec theta, int M, double pi_a, double pi_b, double alpha, double sig2inv, double phi2inv, double mu, int j, int n) {
        typedef SEXP(*Ptr_updatebeta)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_updatebeta p_updatebeta = NULL;
        if (p_updatebeta == NULL) {
            validateSignature("double(*updatebeta)(arma::vec,arma::mat,arma::vec,arma::vec,arma::vec,int,double,double,double,double,double,double,int,int)");
            p_updatebeta = (Ptr_updatebeta)R_GetCCallable("bnmr", "_bnmr_updatebeta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_updatebeta(Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(BA)), Shield<SEXP>(Rcpp::wrap(beta)), Shield<SEXP>(Rcpp::wrap(nc)), Shield<SEXP>(Rcpp::wrap(theta)), Shield<SEXP>(Rcpp::wrap(M)), Shield<SEXP>(Rcpp::wrap(pi_a)), Shield<SEXP>(Rcpp::wrap(pi_b)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(sig2inv)), Shield<SEXP>(Rcpp::wrap(phi2inv)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(j)), 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<double >(rcpp_result_gen);
    }

    inline List mcmc(arma::vec y, arma::mat BA, int M, double pi_a, double pi_b, double alpha_a, double alpha_b, int n, double mu0, double phi2inv, double intvarinv, int thin, int loops) {
        typedef SEXP(*Ptr_mcmc)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_mcmc p_mcmc = NULL;
        if (p_mcmc == NULL) {
            validateSignature("List(*mcmc)(arma::vec,arma::mat,int,double,double,double,double,int,double,double,double,int,int)");
            p_mcmc = (Ptr_mcmc)R_GetCCallable("bnmr", "_bnmr_mcmc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_mcmc(Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(BA)), Shield<SEXP>(Rcpp::wrap(M)), Shield<SEXP>(Rcpp::wrap(pi_a)), Shield<SEXP>(Rcpp::wrap(pi_b)), Shield<SEXP>(Rcpp::wrap(alpha_a)), Shield<SEXP>(Rcpp::wrap(alpha_b)), Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu0)), Shield<SEXP>(Rcpp::wrap(phi2inv)), Shield<SEXP>(Rcpp::wrap(intvarinv)), Shield<SEXP>(Rcpp::wrap(thin)), Shield<SEXP>(Rcpp::wrap(loops)));
        }
        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<List >(rcpp_result_gen);
    }

}

#endif // RCPP_bnmr_RCPPEXPORTS_H_GEN_
