File: PoissonBinomial_RcppExports.h

package info (click to toggle)
r-cran-poissonbinomial 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 736 kB
  • sloc: cpp: 719; makefile: 3
file content (596 lines) | stat: -rw-r--r-- 32,683 bytes parent folder | download | duplicates (3)
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#ifndef RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_
#define RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace PoissonBinomial {

    using namespace Rcpp;

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

    inline int vectorGCD(const IntegerVector x) {
        typedef SEXP(*Ptr_vectorGCD)(SEXP);
        static Ptr_vectorGCD p_vectorGCD = NULL;
        if (p_vectorGCD == NULL) {
            validateSignature("int(*vectorGCD)(const IntegerVector)");
            p_vectorGCD = (Ptr_vectorGCD)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_vectorGCD");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_vectorGCD(Shield<SEXP>(Rcpp::wrap(x)));
        }
        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<int >(rcpp_result_gen);
    }

    inline NumericVector dpb_conv(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_conv)(SEXP,SEXP);
        static Ptr_dpb_conv p_dpb_conv = NULL;
        if (p_dpb_conv == NULL) {
            validateSignature("NumericVector(*dpb_conv)(const IntegerVector,const NumericVector)");
            p_dpb_conv = (Ptr_dpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_conv(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_conv)(SEXP,SEXP,SEXP);
        static Ptr_ppb_conv p_ppb_conv = NULL;
        if (p_ppb_conv == NULL) {
            validateSignature("NumericVector(*ppb_conv)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_conv = (Ptr_ppb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_dc(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_dc)(SEXP,SEXP);
        static Ptr_dpb_dc p_dpb_dc = NULL;
        if (p_dpb_dc == NULL) {
            validateSignature("NumericVector(*dpb_dc)(const IntegerVector,const NumericVector)");
            p_dpb_dc = (Ptr_dpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_dc(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_dc)(SEXP,SEXP,SEXP);
        static Ptr_ppb_dc p_ppb_dc = NULL;
        if (p_ppb_dc == NULL) {
            validateSignature("NumericVector(*ppb_dc)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_dc = (Ptr_ppb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_dftcf(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_dftcf)(SEXP,SEXP);
        static Ptr_dpb_dftcf p_dpb_dftcf = NULL;
        if (p_dpb_dftcf == NULL) {
            validateSignature("NumericVector(*dpb_dftcf)(const IntegerVector,const NumericVector)");
            p_dpb_dftcf = (Ptr_dpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_dftcf(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_dftcf)(SEXP,SEXP,SEXP);
        static Ptr_ppb_dftcf p_ppb_dftcf = NULL;
        if (p_ppb_dftcf == NULL) {
            validateSignature("NumericVector(*ppb_dftcf)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_dftcf = (Ptr_ppb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_rf(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_rf)(SEXP,SEXP);
        static Ptr_dpb_rf p_dpb_rf = NULL;
        if (p_dpb_rf == NULL) {
            validateSignature("NumericVector(*dpb_rf)(const IntegerVector,const NumericVector)");
            p_dpb_rf = (Ptr_dpb_rf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_rf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_rf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_rf(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_rf)(SEXP,SEXP,SEXP);
        static Ptr_ppb_rf p_ppb_rf = NULL;
        if (p_ppb_rf == NULL) {
            validateSignature("NumericVector(*ppb_rf)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_rf = (Ptr_ppb_rf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_rf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_rf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_mean(IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_mean)(SEXP,SEXP);
        static Ptr_dpb_mean p_dpb_mean = NULL;
        if (p_dpb_mean == NULL) {
            validateSignature("NumericVector(*dpb_mean)(IntegerVector,const NumericVector)");
            p_dpb_mean = (Ptr_dpb_mean)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_mean");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_mean(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_mean(const IntegerVector obs, const NumericVector probs, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_mean)(SEXP,SEXP,SEXP);
        static Ptr_ppb_mean p_ppb_mean = NULL;
        if (p_ppb_mean == NULL) {
            validateSignature("NumericVector(*ppb_mean)(const IntegerVector,const NumericVector,const bool)");
            p_ppb_mean = (Ptr_ppb_mean)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_mean");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_mean(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_gmba(const IntegerVector obs, const NumericVector probs, const bool anti = false) {
        typedef SEXP(*Ptr_dpb_gmba)(SEXP,SEXP,SEXP);
        static Ptr_dpb_gmba p_dpb_gmba = NULL;
        if (p_dpb_gmba == NULL) {
            validateSignature("NumericVector(*dpb_gmba)(const IntegerVector,const NumericVector,const bool)");
            p_dpb_gmba = (Ptr_dpb_gmba)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_gmba");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_gmba(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(anti)));
        }
        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 NumericVector ppb_gmba(const IntegerVector obs, const NumericVector probs, const bool anti = false, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_gmba)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_ppb_gmba p_ppb_gmba = NULL;
        if (p_ppb_gmba == NULL) {
            validateSignature("NumericVector(*ppb_gmba)(const IntegerVector,const NumericVector,const bool,const bool)");
            p_ppb_gmba = (Ptr_ppb_gmba)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_gmba");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_gmba(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(anti)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_pa(const IntegerVector obs, const NumericVector probs) {
        typedef SEXP(*Ptr_dpb_pa)(SEXP,SEXP);
        static Ptr_dpb_pa p_dpb_pa = NULL;
        if (p_dpb_pa == NULL) {
            validateSignature("NumericVector(*dpb_pa)(const IntegerVector,const NumericVector)");
            p_dpb_pa = (Ptr_dpb_pa)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_pa");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_pa(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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 NumericVector ppb_pa(const IntegerVector obs, const NumericVector probs, bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_pa)(SEXP,SEXP,SEXP);
        static Ptr_ppb_pa p_ppb_pa = NULL;
        if (p_ppb_pa == NULL) {
            validateSignature("NumericVector(*ppb_pa)(const IntegerVector,const NumericVector,bool)");
            p_ppb_pa = (Ptr_ppb_pa)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_pa");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_pa(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector ppb_na(const IntegerVector obs, const NumericVector probs, const bool refined = true, const bool lower_tail = true) {
        typedef SEXP(*Ptr_ppb_na)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_ppb_na p_ppb_na = NULL;
        if (p_ppb_na == NULL) {
            validateSignature("NumericVector(*ppb_na)(const IntegerVector,const NumericVector,const bool,const bool)");
            p_ppb_na = (Ptr_ppb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_ppb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ppb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(refined)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dpb_na(const IntegerVector obs, const NumericVector probs, const bool refined = true) {
        typedef SEXP(*Ptr_dpb_na)(SEXP,SEXP,SEXP);
        static Ptr_dpb_na p_dpb_na = NULL;
        if (p_dpb_na == NULL) {
            validateSignature("NumericVector(*dpb_na)(const IntegerVector,const NumericVector,const bool)");
            p_dpb_na = (Ptr_dpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(refined)));
        }
        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 IntegerVector rpb_bernoulli(const int n, const NumericVector probs) {
        typedef SEXP(*Ptr_rpb_bernoulli)(SEXP,SEXP);
        static Ptr_rpb_bernoulli p_rpb_bernoulli = NULL;
        if (p_rpb_bernoulli == NULL) {
            validateSignature("IntegerVector(*rpb_bernoulli)(const int,const NumericVector)");
            p_rpb_bernoulli = (Ptr_rpb_bernoulli)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_rpb_bernoulli");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rpb_bernoulli(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(probs)));
        }
        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<IntegerVector >(rcpp_result_gen);
    }

    inline NumericVector dgpb_conv(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_conv)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_conv p_dgpb_conv = NULL;
        if (p_dgpb_conv == NULL) {
            validateSignature("NumericVector(*dgpb_conv)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_conv = (Ptr_dgpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 NumericVector pgpb_conv(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_conv)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_conv p_pgpb_conv = NULL;
        if (p_pgpb_conv == NULL) {
            validateSignature("NumericVector(*pgpb_conv)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,bool)");
            p_pgpb_conv = (Ptr_pgpb_conv)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_conv");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_conv(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dgpb_dc(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_dc)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_dc p_dgpb_dc = NULL;
        if (p_dgpb_dc == NULL) {
            validateSignature("NumericVector(*dgpb_dc)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_dc = (Ptr_dgpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 NumericVector pgpb_dc(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_dc)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_dc p_pgpb_dc = NULL;
        if (p_pgpb_dc == NULL) {
            validateSignature("NumericVector(*pgpb_dc)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_pgpb_dc = (Ptr_pgpb_dc)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_dc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_dc(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dgpb_dftcf(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_dgpb_dftcf)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_dftcf p_dgpb_dftcf = NULL;
        if (p_dgpb_dftcf == NULL) {
            validateSignature("NumericVector(*dgpb_dftcf)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector)");
            p_dgpb_dftcf = (Ptr_dgpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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 NumericVector pgpb_dftcf(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_dftcf)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_dftcf p_pgpb_dftcf = NULL;
        if (p_pgpb_dftcf == NULL) {
            validateSignature("NumericVector(*pgpb_dftcf)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_pgpb_dftcf = (Ptr_pgpb_dftcf)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_dftcf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_dftcf(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector pgpb_na(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool refined = true, const bool lower_tail = true) {
        typedef SEXP(*Ptr_pgpb_na)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pgpb_na p_pgpb_na = NULL;
        if (p_pgpb_na == NULL) {
            validateSignature("NumericVector(*pgpb_na)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool,const bool)");
            p_pgpb_na = (Ptr_pgpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_pgpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pgpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(refined)), Shield<SEXP>(Rcpp::wrap(lower_tail)));
        }
        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 NumericVector dgpb_na(const IntegerVector obs, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q, const bool refined = true) {
        typedef SEXP(*Ptr_dgpb_na)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dgpb_na p_dgpb_na = NULL;
        if (p_dgpb_na == NULL) {
            validateSignature("NumericVector(*dgpb_na)(const IntegerVector,const NumericVector,const IntegerVector,const IntegerVector,const bool)");
            p_dgpb_na = (Ptr_dgpb_na)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_dgpb_na");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dgpb_na(Shield<SEXP>(Rcpp::wrap(obs)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)), Shield<SEXP>(Rcpp::wrap(refined)));
        }
        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 IntegerVector rgpb_bernoulli(const int n, const NumericVector probs, const IntegerVector val_p, const IntegerVector val_q) {
        typedef SEXP(*Ptr_rgpb_bernoulli)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_rgpb_bernoulli p_rgpb_bernoulli = NULL;
        if (p_rgpb_bernoulli == NULL) {
            validateSignature("IntegerVector(*rgpb_bernoulli)(const int,const NumericVector,const IntegerVector,const IntegerVector)");
            p_rgpb_bernoulli = (Ptr_rgpb_bernoulli)R_GetCCallable("PoissonBinomial", "_PoissonBinomial_rgpb_bernoulli");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rgpb_bernoulli(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(probs)), Shield<SEXP>(Rcpp::wrap(val_p)), Shield<SEXP>(Rcpp::wrap(val_q)));
        }
        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<IntegerVector >(rcpp_result_gen);
    }

}

#endif // RCPP_PoissonBinomial_RCPPEXPORTS_H_GEN_