-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdqrng_RcppExports.h
307 lines (286 loc) · 14.6 KB
/
dqrng_RcppExports.h
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#ifndef RCPP_dqrng_RCPPEXPORTS_H_GEN_
#define RCPP_dqrng_RCPPEXPORTS_H_GEN_
#include "dqrng_types.h"
#include <Rcpp.h>
namespace dqrng {
using namespace Rcpp;
namespace {
void validateSignature(const char* sig) {
Rcpp::Function require = Rcpp::Environment::base_env()["require"];
require("dqrng", Rcpp::Named("quietly") = true);
typedef int(*Ptr_validate)(const char*);
static Ptr_validate p_validate = (Ptr_validate)
R_GetCCallable("dqrng", "_dqrng_RcppExport_validate");
if (!p_validate(sig)) {
throw Rcpp::function_not_exported(
"C++ function with signature '" + std::string(sig) + "' not found in dqrng");
}
}
}
inline void dqset_seed(Rcpp::Nullable<Rcpp::IntegerVector> seed, Rcpp::Nullable<Rcpp::IntegerVector> stream = R_NilValue) {
typedef SEXP(*Ptr_dqset_seed)(SEXP,SEXP);
static Ptr_dqset_seed p_dqset_seed = NULL;
if (p_dqset_seed == NULL) {
validateSignature("void(*dqset_seed)(Rcpp::Nullable<Rcpp::IntegerVector>,Rcpp::Nullable<Rcpp::IntegerVector>)");
p_dqset_seed = (Ptr_dqset_seed)R_GetCCallable("dqrng", "_dqrng_dqset_seed");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqset_seed(Shield<SEXP>(Rcpp::wrap(seed)), Shield<SEXP>(Rcpp::wrap(stream)));
}
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 void dqRNGkind(std::string kind, const std::string& normal_kind = "ignored") {
typedef SEXP(*Ptr_dqRNGkind)(SEXP,SEXP);
static Ptr_dqRNGkind p_dqRNGkind = NULL;
if (p_dqRNGkind == NULL) {
validateSignature("void(*dqRNGkind)(std::string,const std::string&)");
p_dqRNGkind = (Ptr_dqRNGkind)R_GetCCallable("dqrng", "_dqrng_dqRNGkind");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqRNGkind(Shield<SEXP>(Rcpp::wrap(kind)), Shield<SEXP>(Rcpp::wrap(normal_kind)));
}
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 std::vector<std::string> dqrng_get_state() {
typedef SEXP(*Ptr_dqrng_get_state)();
static Ptr_dqrng_get_state p_dqrng_get_state = NULL;
if (p_dqrng_get_state == NULL) {
validateSignature("std::vector<std::string>(*dqrng_get_state)()");
p_dqrng_get_state = (Ptr_dqrng_get_state)R_GetCCallable("dqrng", "_dqrng_dqrng_get_state");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrng_get_state();
}
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<std::vector<std::string> >(rcpp_result_gen);
}
inline void dqrng_set_state(std::vector<std::string> state) {
typedef SEXP(*Ptr_dqrng_set_state)(SEXP);
static Ptr_dqrng_set_state p_dqrng_set_state = NULL;
if (p_dqrng_set_state == NULL) {
validateSignature("void(*dqrng_set_state)(std::vector<std::string>)");
p_dqrng_set_state = (Ptr_dqrng_set_state)R_GetCCallable("dqrng", "_dqrng_dqrng_set_state");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrng_set_state(Shield<SEXP>(Rcpp::wrap(state)));
}
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::NumericVector dqrunif(size_t n, double min = 0.0, double max = 1.0) {
typedef SEXP(*Ptr_dqrunif)(SEXP,SEXP,SEXP);
static Ptr_dqrunif p_dqrunif = NULL;
if (p_dqrunif == NULL) {
validateSignature("Rcpp::NumericVector(*dqrunif)(size_t,double,double)");
p_dqrunif = (Ptr_dqrunif)R_GetCCallable("dqrng", "_dqrng_dqrunif");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrunif(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)));
}
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::NumericVector >(rcpp_result_gen);
}
inline double runif(double min = 0.0, double max = 1.0) {
typedef SEXP(*Ptr_runif)(SEXP,SEXP);
static Ptr_runif p_runif = NULL;
if (p_runif == NULL) {
validateSignature("double(*runif)(double,double)");
p_runif = (Ptr_runif)R_GetCCallable("dqrng", "_dqrng_runif");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_runif(Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)));
}
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<double >(rcpp_result_gen);
}
inline Rcpp::NumericVector dqrnorm(size_t n, double mean = 0.0, double sd = 1.0) {
typedef SEXP(*Ptr_dqrnorm)(SEXP,SEXP,SEXP);
static Ptr_dqrnorm p_dqrnorm = NULL;
if (p_dqrnorm == NULL) {
validateSignature("Rcpp::NumericVector(*dqrnorm)(size_t,double,double)");
p_dqrnorm = (Ptr_dqrnorm)R_GetCCallable("dqrng", "_dqrng_dqrnorm");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrnorm(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)));
}
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::NumericVector >(rcpp_result_gen);
}
inline double rnorm(double mean = 0.0, double sd = 1.0) {
typedef SEXP(*Ptr_rnorm)(SEXP,SEXP);
static Ptr_rnorm p_rnorm = NULL;
if (p_rnorm == NULL) {
validateSignature("double(*rnorm)(double,double)");
p_rnorm = (Ptr_rnorm)R_GetCCallable("dqrng", "_dqrng_rnorm");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_rnorm(Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)));
}
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<double >(rcpp_result_gen);
}
inline Rcpp::NumericVector dqrexp(size_t n, double rate = 1.0) {
typedef SEXP(*Ptr_dqrexp)(SEXP,SEXP);
static Ptr_dqrexp p_dqrexp = NULL;
if (p_dqrexp == NULL) {
validateSignature("Rcpp::NumericVector(*dqrexp)(size_t,double)");
p_dqrexp = (Ptr_dqrexp)R_GetCCallable("dqrng", "_dqrng_dqrexp");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrexp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(rate)));
}
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::NumericVector >(rcpp_result_gen);
}
inline double rexp(double rate = 1.0) {
typedef SEXP(*Ptr_rexp)(SEXP);
static Ptr_rexp p_rexp = NULL;
if (p_rexp == NULL) {
validateSignature("double(*rexp)(double)");
p_rexp = (Ptr_rexp)R_GetCCallable("dqrng", "_dqrng_rexp");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_rexp(Shield<SEXP>(Rcpp::wrap(rate)));
}
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<double >(rcpp_result_gen);
}
inline Rcpp::XPtr<dqrng::random_64bit_generator> get_rng() {
typedef SEXP(*Ptr_get_rng)();
static Ptr_get_rng p_get_rng = NULL;
if (p_get_rng == NULL) {
validateSignature("Rcpp::XPtr<dqrng::random_64bit_generator>(*get_rng)()");
p_get_rng = (Ptr_get_rng)R_GetCCallable("dqrng", "_dqrng_get_rng");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_get_rng();
}
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::XPtr<dqrng::random_64bit_generator> >(rcpp_result_gen);
}
inline Rcpp::IntegerVector dqrrademacher(size_t n) {
typedef SEXP(*Ptr_dqrrademacher)(SEXP);
static Ptr_dqrrademacher p_dqrrademacher = NULL;
if (p_dqrrademacher == NULL) {
validateSignature("Rcpp::IntegerVector(*dqrrademacher)(size_t)");
p_dqrrademacher = (Ptr_dqrrademacher)R_GetCCallable("dqrng", "_dqrng_dqrrademacher");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqrrademacher(Shield<SEXP>(Rcpp::wrap(n)));
}
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::IntegerVector >(rcpp_result_gen);
}
inline Rcpp::IntegerVector dqsample_int(int n, int size, bool replace = false, Rcpp::Nullable<Rcpp::NumericVector> probs = R_NilValue, int offset = 0) {
typedef SEXP(*Ptr_dqsample_int)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_dqsample_int p_dqsample_int = NULL;
if (p_dqsample_int == NULL) {
validateSignature("Rcpp::IntegerVector(*dqsample_int)(int,int,bool,Rcpp::Nullable<Rcpp::NumericVector>,int)");
p_dqsample_int = (Ptr_dqsample_int)R_GetCCallable("dqrng", "_dqrng_dqsample_int");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqsample_int(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(replace)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(offset)));
}
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::IntegerVector >(rcpp_result_gen);
}
inline Rcpp::NumericVector dqsample_num(double n, double size, bool replace = false, Rcpp::Nullable<Rcpp::NumericVector> probs = R_NilValue, int offset = 0) {
typedef SEXP(*Ptr_dqsample_num)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_dqsample_num p_dqsample_num = NULL;
if (p_dqsample_num == NULL) {
validateSignature("Rcpp::NumericVector(*dqsample_num)(double,double,bool,Rcpp::Nullable<Rcpp::NumericVector>,int)");
p_dqsample_num = (Ptr_dqsample_num)R_GetCCallable("dqrng", "_dqrng_dqsample_num");
}
RObject rcpp_result_gen;
{
rcpp_result_gen = p_dqsample_num(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(size)), Shield<SEXP>(Rcpp::wrap(replace)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(offset)));
}
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::NumericVector >(rcpp_result_gen);
}
}
#endif // RCPP_dqrng_RCPPEXPORTS_H_GEN_