22 #ifndef Rcpp__stats__dpq__dpq_h
23 #define Rcpp__stats__dpq__dpq_h
32 template <
int RTYPE,
bool NA,
typename T>
36 typedef double (*
FunPtr)(double,int) ;
53 template <
int RTYPE,
bool NA,
typename T>
57 typedef double (*
FunPtr)(double,double,int) ;
75 template <
int RTYPE,
bool NA,
typename T>
79 typedef double (*
FunPtr)(double,double,double,int) ;
97 template <
int RTYPE,
bool NA,
typename T>
101 typedef double (*
FunPtr)(double,double,double,double,int) ;
122 template <
int RTYPE,
bool NA,
typename T>
126 typedef double (*
FunPtr)(double,int,int) ;
129 bool lower_tail =
true,
bool log_ =
false ) :
146 template <
int RTYPE,
bool NA,
typename T>
150 typedef double (*
FunPtr)(double,double,int,int) ;
153 bool lower_tail =
true,
bool log_ =
false ) :
171 template <
int RTYPE,
bool NA,
typename T>
175 typedef double (*
FunPtr)(double,double,double,int,int) ;
178 bool lower_tail =
true,
bool log_ =
false ) :
194 template <
int RTYPE,
bool NA,
typename T>
198 typedef double (*
FunPtr)(double,double,double,double,int,int) ;
201 bool lower_tail =
true,
bool log_ =
false ) :
220 template <
int RTYPE,
bool NA,
typename T>
224 typedef double (*
FunPtr)(double,int,int) ;
227 bool lower_tail =
true,
bool log_ =
false ) :
243 template <
int RTYPE,
bool NA,
typename T>
247 typedef double (*
FunPtr)(double,double,int,int) ;
250 bool lower_tail =
true,
bool log_ =
false ) :
267 template <
int RTYPE,
bool NA,
typename T>
271 typedef double (*
FunPtr)(double,double,double,int,int) ;
274 bool lower_tail =
true,
bool log_ =
false ) :
291 template <
int RTYPE,
bool NA,
typename T>
295 typedef double (*
FunPtr)(double,double,double,double,int,int) ;
298 bool lower_tail =
true,
bool log_ =
false ) :
318 #define RCPP_DPQ_0(__NAME__,__D__,__P__,__Q__) \
320 template <int RTYPE, bool NA, typename T> \
321 inline 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 ); \
326 template <int RTYPE, bool NA, typename T> \
327 inline 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 ); \
332 template <int RTYPE, bool NA, typename T> \
333 inline 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__) \
342 template <int RTYPE, bool NA, typename T> \
343 inline 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 ); \
348 template <int RTYPE, bool NA, typename T> \
349 inline 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 ); \
354 template <int RTYPE, bool NA, typename T> \
355 inline 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__) \
365 template <int RTYPE, bool NA, typename T> \
366 inline 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 ); \
371 template <int RTYPE, bool NA, typename T> \
372 inline 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 ); \
377 template <int RTYPE, bool NA, typename T> \
378 inline 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__) \
388 template <int RTYPE, bool NA, typename T> \
389 inline 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 ); \
394 template <int RTYPE, bool NA, typename T> \
395 inline 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 ); \
400 template <int RTYPE, bool NA, typename T> \
401 inline 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