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

#ifndef RCPP_BNPMIXcluster_RCPPEXPORTS_H_GEN_
#define RCPP_BNPMIXcluster_RCPPEXPORTS_H_GEN_

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

namespace BNPMIXcluster {

    using namespace Rcpp;

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

    inline arma::vec dmvnrm_arma(arma::mat x, arma::rowvec mean, arma::mat sigma, bool logd = false) {
        typedef SEXP(*Ptr_dmvnrm_arma)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dmvnrm_arma p_dmvnrm_arma = NULL;
        if (p_dmvnrm_arma == NULL) {
            validateSignature("arma::vec(*dmvnrm_arma)(arma::mat,arma::rowvec,arma::mat,bool)");
            p_dmvnrm_arma = (Ptr_dmvnrm_arma)R_GetCCallable("BNPMIXcluster", "_BNPMIXcluster_dmvnrm_arma");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dmvnrm_arma(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(logd)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::vec >(rcpp_result_gen);
    }

    inline double rtn1(const double mean, const double sd, const double low, const double high) {
        typedef SEXP(*Ptr_rtn1)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_rtn1 p_rtn1 = NULL;
        if (p_rtn1 == NULL) {
            validateSignature("double(*rtn1)(const double,const double,const double,const double)");
            p_rtn1 = (Ptr_rtn1)R_GetCCallable("BNPMIXcluster", "_BNPMIXcluster_rtn1");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rtn1(Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(low)), Shield<SEXP>(Rcpp::wrap(high)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

}

#endif // RCPP_BNPMIXcluster_RCPPEXPORTS_H_GEN_
