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

#ifndef RCPP_mets_RCPPEXPORTS_H_GEN_
#define RCPP_mets_RCPPEXPORTS_H_GEN_

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

namespace mets {

    using namespace Rcpp;

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

    inline arma::mat _loglikMVN(arma::mat Yl, SEXP yu, SEXP status, arma::mat Mu, SEXP dmu, arma::mat S, SEXP ds, SEXP z, SEXP su, SEXP dsu, SEXP threshold, SEXP dthreshold, bool Score, double itol) {
        typedef SEXP(*Ptr__loglikMVN)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__loglikMVN p__loglikMVN = NULL;
        if (p__loglikMVN == NULL) {
            validateSignature("arma::mat(*_loglikMVN)(arma::mat,SEXP,SEXP,arma::mat,SEXP,arma::mat,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,bool,double)");
            p__loglikMVN = (Ptr__loglikMVN)R_GetCCallable("mets", "_mets__loglikMVN");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__loglikMVN(Shield<SEXP>(Rcpp::wrap(Yl)), Shield<SEXP>(Rcpp::wrap(yu)), Shield<SEXP>(Rcpp::wrap(status)), Shield<SEXP>(Rcpp::wrap(Mu)), Shield<SEXP>(Rcpp::wrap(dmu)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(ds)), Shield<SEXP>(Rcpp::wrap(z)), Shield<SEXP>(Rcpp::wrap(su)), Shield<SEXP>(Rcpp::wrap(dsu)), Shield<SEXP>(Rcpp::wrap(threshold)), Shield<SEXP>(Rcpp::wrap(dthreshold)), Shield<SEXP>(Rcpp::wrap(Score)), Shield<SEXP>(Rcpp::wrap(itol)));
        }
        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::mat >(rcpp_result_gen);
    }

    inline NumericVector _dmvn(arma::mat u, arma::mat mu, arma::mat rho) {
        typedef SEXP(*Ptr__dmvn)(SEXP,SEXP,SEXP);
        static Ptr__dmvn p__dmvn = NULL;
        if (p__dmvn == NULL) {
            validateSignature("NumericVector(*_dmvn)(arma::mat,arma::mat,arma::mat)");
            p__dmvn = (Ptr__dmvn)R_GetCCallable("mets", "_mets__dmvn");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__dmvn(Shield<SEXP>(Rcpp::wrap(u)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(rho)));
        }
        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 arma::mat _rmvn(unsigned n, arma::mat mu, arma::mat rho) {
        typedef SEXP(*Ptr__rmvn)(SEXP,SEXP,SEXP);
        static Ptr__rmvn p__rmvn = NULL;
        if (p__rmvn == NULL) {
            validateSignature("arma::mat(*_rmvn)(unsigned,arma::mat,arma::mat)");
            p__rmvn = (Ptr__rmvn)R_GetCCallable("mets", "_mets__rmvn");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__rmvn(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mu)), Shield<SEXP>(Rcpp::wrap(rho)));
        }
        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::mat >(rcpp_result_gen);
    }

    inline arma::vec _rpch(unsigned n, std::vector<double> lambda, std::vector<double> time) {
        typedef SEXP(*Ptr__rpch)(SEXP,SEXP,SEXP);
        static Ptr__rpch p__rpch = NULL;
        if (p__rpch == NULL) {
            validateSignature("arma::vec(*_rpch)(unsigned,std::vector<double>,std::vector<double>)");
            p__rpch = (Ptr__rpch)R_GetCCallable("mets", "_mets__rpch");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__rpch(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(time)));
        }
        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 _cpch(arma::vec& x, std::vector<double> lambda, std::vector<double> time) {
        typedef SEXP(*Ptr__cpch)(SEXP,SEXP,SEXP);
        static Ptr__cpch p__cpch = NULL;
        if (p__cpch == NULL) {
            validateSignature("arma::vec(*_cpch)(arma::vec&,std::vector<double>,std::vector<double>)");
            p__cpch = (Ptr__cpch)R_GetCCallable("mets", "_mets__cpch");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__cpch(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(lambda)), Shield<SEXP>(Rcpp::wrap(time)));
        }
        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);
    }

}

#endif // RCPP_mets_RCPPEXPORTS_H_GEN_
