File: RcppExports.cpp

package info (click to toggle)
r-cran-ctmcd 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,384 kB
  • sloc: cpp: 183; ansic: 19; makefile: 2
file content (93 lines) | stat: -rw-r--r-- 3,882 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 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;
}