24 #ifndef Rcpp__stats__unif_h
25 #define Rcpp__stats__unif_h
30 inline double dunif_1(
double x,
double a ,
32 return ::Rf_dunif(x, a, 1.0,
give_log ) ;
41 if (0.0 <= x && x <= 1.0)
return give_log ? 0.0 : 1.0 ;
46 inline double punif_1(
double x,
double a ,
47 int lower_tail,
int log_p) {
48 return ::Rf_punif( x, a, 1.0, lower_tail, log_p ) ;
51 int lower_tail,
int log_p) {
60 if (lower_tail)
return R_D_val(x);
65 inline double qunif_1(
double p,
double a ,
66 int lower_tail,
int log_p) {
68 if (ISNAN(p) || ISNAN(a) )
72 if (!R_FINITE(a) )
return R_NaN;
73 if (1.0 < a)
return R_NaN;
74 if (1.0 == a)
return a;
80 int lower_tail,
int log_p) {
96 RCPP_DPQ_2(unif, ::Rf_dunif, ::Rf_punif, ::Rf_qunif )
#define RCPP_DPQ_2(__NAME__, __D__, __P__, __Q__)
#define RCPP_DPQ_1(__NAME__, __D__, __P__, __Q__)
#define RCPP_DPQ_0(__NAME__, __D__, __P__, __Q__)
double qunif_1(double p, double a, int lower_tail, int log_p)
double qunif_0(double p, int lower_tail, int log_p)
double punif_0(double x, int lower_tail, int log_p)
double dunif_0(double x, int give_log)
double dunif_1(double x, double a, int give_log)
double punif_1(double x, double a, int lower_tail, int log_p)