22#ifndef Rcpp__stats__dpq__dpq_h
23#define Rcpp__stats__dpq__dpq_h
32template <
int RTYPE,
bool NA,
typename T>
53template <
int RTYPE,
bool NA,
typename T>
75template <
int RTYPE,
bool NA,
typename T>
97template <
int RTYPE,
bool NA,
typename T>
122template <
int RTYPE,
bool NA,
typename T>
146template <
int RTYPE,
bool NA,
typename T>
171template <
int RTYPE,
bool NA,
typename T>
194template <
int RTYPE,
bool NA,
typename T>
220template <
int RTYPE,
bool NA,
typename T>
243template <
int RTYPE,
bool NA,
typename T>
267template <
int RTYPE,
bool NA,
typename T>
291template <
int RTYPE,
bool NA,
typename T>
318#define RCPP_DPQ_0(__NAME__,__D__,__P__,__Q__) \
320template <int RTYPE, bool NA, typename T> \
321inline stats::D0<RTYPE,NA,T> d##__NAME__( \
322 const Rcpp::VectorBase<RTYPE,NA,T>& x, bool log = false \
324 return stats::D0<RTYPE,NA,T>( __D__, x, log ); \
326template <int RTYPE, bool NA, typename T> \
327inline stats::P0<RTYPE,NA,T> p##__NAME__( \
328 const Rcpp::VectorBase<RTYPE,NA,T>& x, bool lower = true, bool log = false \
330 return stats::P0<RTYPE,NA,T>( __P__, x, lower, log ); \
332template <int RTYPE, bool NA, typename T> \
333inline stats::Q0<RTYPE,NA,T> q##__NAME__( \
334 const Rcpp::VectorBase<RTYPE,NA,T>& x, bool lower = true, bool log = false \
336 return stats::Q0<RTYPE,NA,T>( __Q__, x, lower, log ); \
340#define RCPP_DPQ_1(__NAME__,__D__,__P__,__Q__) \
342template <int RTYPE, bool NA, typename T> \
343inline stats::D1<RTYPE,NA,T> d##__NAME__( \
344 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool log = false \
346 return stats::D1<RTYPE,NA,T>( __D__, x, p0, log ); \
348template <int RTYPE, bool NA, typename T> \
349inline stats::P1<RTYPE,NA,T> p##__NAME__( \
350 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool lower = true, bool log = false \
352 return stats::P1<RTYPE,NA,T>( __P__, x, p0, lower, log ); \
354template <int RTYPE, bool NA, typename T> \
355inline stats::Q1<RTYPE,NA,T> q##__NAME__( \
356 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool lower = true, bool log = false \
358 return stats::Q1<RTYPE,NA,T>( __Q__, x, p0, lower, log ); \
363#define RCPP_DPQ_2(__NAME__,__D__,__P__,__Q__) \
365template <int RTYPE, bool NA, typename T> \
366inline stats::D2<RTYPE,NA,T> d##__NAME__( \
367 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool log = false \
369 return stats::D2<RTYPE,NA,T>( __D__, x, p0, p1, log ); \
371template <int RTYPE, bool NA, typename T> \
372inline stats::P2<RTYPE,NA,T> p##__NAME__( \
373 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool lower = true, bool log = false \
375 return stats::P2<RTYPE,NA,T>( __P__, x, p0, p1, lower, log ); \
377template <int RTYPE, bool NA, typename T> \
378inline stats::Q2<RTYPE,NA,T> q##__NAME__( \
379 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool lower = true, bool log = false \
381 return stats::Q2<RTYPE,NA,T>( __Q__, x, p0, p1, lower, log ); \
386#define RCPP_DPQ_3(__NAME__,__D__,__P__,__Q__) \
388template <int RTYPE, bool NA, typename T> \
389inline stats::D3<RTYPE,NA,T> d##__NAME__( \
390 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool log = false \
392 return stats::D3<RTYPE,NA,T>( __D__, x, p0, p1, p2, log ); \
394template <int RTYPE, bool NA, typename T> \
395inline stats::P3<RTYPE,NA,T> p##__NAME__( \
396 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool lower = true, bool log = false \
398 return stats::P3<RTYPE,NA,T>( __P__, x, p0, p1, p2, lower, log ); \
400template <int RTYPE, bool NA, typename T> \
401inline stats::Q3<RTYPE,NA,T> q##__NAME__( \
402 const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool lower = true, bool log = false \
404 return stats::Q3<RTYPE,NA,T>( __Q__, x, p0, p1, p2, lower, log ); \
double operator[](int i) const
double(* FunPtr)(double, int)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
D0(FunPtr ptr_, const VEC_TYPE &vec_, bool log_)
double operator[](int i) const
D1(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, bool log_)
double(* FunPtr)(double, double, int)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double operator[](int i) const
D2(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, bool log_)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, double, double, int)
double operator[](int i) const
D3(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, double p2_, bool log_)
double(* FunPtr)(double, double, double, double, int)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, int, int)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double operator[](int i) const
P0(FunPtr ptr_, const VEC_TYPE &vec_, bool lower_tail=true, bool log_=false)
double operator[](int i) const
double(* FunPtr)(double, double, int, int)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
P1(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, bool lower_tail=true, bool log_=false)
double operator[](int i) const
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, double, double, int, int)
P2(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, bool lower_tail=true, bool log_=false)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, double, double, double, int, int)
double operator[](int i) const
P3(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, double p2_, bool lower_tail=true, bool log_=false)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double operator[](int i) const
Q0(FunPtr ptr_, const VEC_TYPE &vec_, bool lower_tail=true, bool log_=false)
double(* FunPtr)(double, int, int)
double operator[](int i) const
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, double, int, int)
Q1(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, bool lower_tail=true, bool log_=false)
double operator[](int i) const
double(* FunPtr)(double, double, double, int, int)
Q2(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, bool lower_tail=true, bool log_=false)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
double(* FunPtr)(double, double, double, double, int, int)
Q3(FunPtr ptr_, const VEC_TYPE &vec_, double p0_, double p1_, double p2_, bool lower_tail=true, bool log_=false)
double operator[](int i) const