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

#ifndef RCPP_BayesMRA_RCPPEXPORTS_H_GEN_
#define RCPP_BayesMRA_RCPPEXPORTS_H_GEN_

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

namespace BayesMRA {

    using namespace Rcpp;

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

    inline arma::vec rmvn_arma(arma::mat& A, arma::vec& b) {
        typedef SEXP(*Ptr_rmvn_arma)(SEXP,SEXP);
        static Ptr_rmvn_arma p_rmvn_arma = NULL;
        if (p_rmvn_arma == NULL) {
            validateSignature("arma::vec(*rmvn_arma)(arma::mat&,arma::vec&)");
            p_rmvn_arma = (Ptr_rmvn_arma)R_GetCCallable("BayesMRA", "_BayesMRA_rmvn_arma");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rmvn_arma(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<arma::vec >(rcpp_result_gen);
    }

    inline arma::vec rmvn_arma_chol(arma::mat& A_chol, arma::vec& b) {
        typedef SEXP(*Ptr_rmvn_arma_chol)(SEXP,SEXP);
        static Ptr_rmvn_arma_chol p_rmvn_arma_chol = NULL;
        if (p_rmvn_arma_chol == NULL) {
            validateSignature("arma::vec(*rmvn_arma_chol)(arma::mat&,arma::vec&)");
            p_rmvn_arma_chol = (Ptr_rmvn_arma_chol)R_GetCCallable("BayesMRA", "_BayesMRA_rmvn_arma_chol");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rmvn_arma_chol(Shield<SEXP>(Rcpp::wrap(A_chol)), 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<arma::vec >(rcpp_result_gen);
    }

    inline double rmvn_arma_scalar(const double& a, const double& b) {
        typedef SEXP(*Ptr_rmvn_arma_scalar)(SEXP,SEXP);
        static Ptr_rmvn_arma_scalar p_rmvn_arma_scalar = NULL;
        if (p_rmvn_arma_scalar == NULL) {
            validateSignature("double(*rmvn_arma_scalar)(const double&,const double&)");
            p_rmvn_arma_scalar = (Ptr_rmvn_arma_scalar)R_GetCCallable("BayesMRA", "_BayesMRA_rmvn_arma_scalar");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rmvn_arma_scalar(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);
    }

}

#endif // RCPP_BayesMRA_RCPPEXPORTS_H_GEN_
