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

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

using namespace Rcpp;

// rNijTRiT_ModRej
RcppExport SEXP rNijTRiT_ModRej(const NumericMatrix tmabs, const double te, const Rcpp::NumericMatrix gm);
static SEXP ctmcd_rNijTRiT_ModRej_try(SEXP tmabsSEXP, SEXP teSEXP, SEXP gmSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< const NumericMatrix >::type tmabs(tmabsSEXP);
    Rcpp::traits::input_parameter< const double >::type te(teSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix >::type gm(gmSEXP);
    rcpp_result_gen = Rcpp::wrap(rNijTRiT_ModRej(tmabs, te, gm));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP ctmcd_rNijTRiT_ModRej(SEXP tmabsSEXP, SEXP teSEXP, SEXP gmSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(ctmcd_rNijTRiT_ModRej_try(tmabsSEXP, teSEXP, gmSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        Rf_error(CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// rNijTRiT_Unif
RcppExport SEXP rNijTRiT_Unif(const arma::mat tmabs, const double te, const arma::mat gm, const arma::mat tpm);
static SEXP ctmcd_rNijTRiT_Unif_try(SEXP tmabsSEXP, SEXP teSEXP, SEXP gmSEXP, SEXP tpmSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< const arma::mat >::type tmabs(tmabsSEXP);
    Rcpp::traits::input_parameter< const double >::type te(teSEXP);
    Rcpp::traits::input_parameter< const arma::mat >::type gm(gmSEXP);
    Rcpp::traits::input_parameter< const arma::mat >::type tpm(tpmSEXP);
    rcpp_result_gen = Rcpp::wrap(rNijTRiT_Unif(tmabs, te, gm, tpm));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP ctmcd_rNijTRiT_Unif(SEXP tmabsSEXP, SEXP teSEXP, SEXP gmSEXP, SEXP tpmSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(ctmcd_rNijTRiT_Unif_try(tmabsSEXP, teSEXP, gmSEXP, tpmSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        Rf_error(CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}

// validate (ensure exported C++ functions exist before calling them)
static int ctmcd_RcppExport_validate(const char* sig) { 
    static std::set<std::string> signatures;
    if (signatures.empty()) {
        signatures.insert("RcppExport SEXP(*rNijTRiT_ModRej)(const NumericMatrix,const double,const Rcpp::NumericMatrix)");
        signatures.insert("RcppExport SEXP(*rNijTRiT_Unif)(const arma::mat,const double,const arma::mat,const arma::mat)");
    }
    return signatures.find(sig) != signatures.end();
}

// registerCCallable (register entry points for exported C++ functions)
RcppExport SEXP ctmcd_RcppExport_registerCCallable() { 
    R_RegisterCCallable("ctmcd", "ctmcd_rNijTRiT_ModRej", (DL_FUNC)ctmcd_rNijTRiT_ModRej_try);
    R_RegisterCCallable("ctmcd", "ctmcd_rNijTRiT_Unif", (DL_FUNC)ctmcd_rNijTRiT_Unif_try);
    R_RegisterCCallable("ctmcd", "ctmcd_RcppExport_validate", (DL_FUNC)ctmcd_RcppExport_validate);
    return R_NilValue;
}
