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

#ifndef RCPP_BayesLN_RCPPEXPORTS_H_GEN_
#define RCPP_BayesLN_RCPPEXPORTS_H_GEN_

#include <RcppEigen.h>
#include <Rcpp.h>

namespace BayesLN {

    using namespace Rcpp;

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

    inline void rmn_mu_S2(Eigen::VectorXd& rnd_vec, const int p, const Eigen::VectorXd mu, const Eigen::MatrixXd S) {
        typedef SEXP(*Ptr_rmn_mu_S2)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_rmn_mu_S2 p_rmn_mu_S2 = NULL;
        if (p_rmn_mu_S2 == NULL) {
            validateSignature("void(*rmn_mu_S2)(Eigen::VectorXd&,const int,const Eigen::VectorXd,const Eigen::MatrixXd)");
            p_rmn_mu_S2 = (Ptr_rmn_mu_S2)R_GetCCallable("BayesLN", "_BayesLN_rmn_mu_S2");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rmn_mu_S2(Shield<SEXP>(Rcpp::wrap(rnd_vec)), Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(S)));
        }
        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());
    }

    inline Rcpp::List MCMC_alg(const Eigen::VectorXd y, const Eigen::MatrixXd X, const List Z_list, const List K_gamma_list, const Eigen::MatrixXd S_beta_pri, double l_s, Eigen::VectorXd l_t, double d_s, Eigen::VectorXd d_t, double g_s, Eigen::VectorXd g_t, int s, int nsamp, int verbose, Eigen::VectorXd beta_init, double sigma2_init, Eigen::VectorXd tau2_init) {
        typedef SEXP(*Ptr_MCMC_alg)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_MCMC_alg p_MCMC_alg = NULL;
        if (p_MCMC_alg == NULL) {
            validateSignature("Rcpp::List(*MCMC_alg)(const Eigen::VectorXd,const Eigen::MatrixXd,const List,const List,const Eigen::MatrixXd,double,Eigen::VectorXd,double,Eigen::VectorXd,double,Eigen::VectorXd,int,int,int,Eigen::VectorXd,double,Eigen::VectorXd)");
            p_MCMC_alg = (Ptr_MCMC_alg)R_GetCCallable("BayesLN", "_BayesLN_MCMC_alg");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_MCMC_alg(Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(X)), Shield<SEXP>(Rcpp::wrap(Z_list)), Shield<SEXP>(Rcpp::wrap(K_gamma_list)), Shield<SEXP>(Rcpp::wrap(S_beta_pri)), Shield<SEXP>(Rcpp::wrap(l_s)), Shield<SEXP>(Rcpp::wrap(l_t)), Shield<SEXP>(Rcpp::wrap(d_s)), Shield<SEXP>(Rcpp::wrap(d_t)), Shield<SEXP>(Rcpp::wrap(g_s)), Shield<SEXP>(Rcpp::wrap(g_t)), Shield<SEXP>(Rcpp::wrap(s)), Shield<SEXP>(Rcpp::wrap(nsamp)), Shield<SEXP>(Rcpp::wrap(verbose)), Shield<SEXP>(Rcpp::wrap(beta_init)), Shield<SEXP>(Rcpp::wrap(sigma2_init)), Shield<SEXP>(Rcpp::wrap(tau2_init)));
        }
        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<Rcpp::List >(rcpp_result_gen);
    }

    inline Eigen::MatrixXd post_pred(List output, Eigen::MatrixXd Xrep, List Zrep_list, int s, int nsamp) {
        typedef SEXP(*Ptr_post_pred)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_post_pred p_post_pred = NULL;
        if (p_post_pred == NULL) {
            validateSignature("Eigen::MatrixXd(*post_pred)(List,Eigen::MatrixXd,List,int,int)");
            p_post_pred = (Ptr_post_pred)R_GetCCallable("BayesLN", "_BayesLN_post_pred");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_post_pred(Shield<SEXP>(Rcpp::wrap(output)), Shield<SEXP>(Rcpp::wrap(Xrep)), Shield<SEXP>(Rcpp::wrap(Zrep_list)), Shield<SEXP>(Rcpp::wrap(s)), Shield<SEXP>(Rcpp::wrap(nsamp)));
        }
        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<Eigen::MatrixXd >(rcpp_result_gen);
    }

}

#endif // RCPP_BayesLN_RCPPEXPORTS_H_GEN_
