154 GetRNGstate();
Real s = Rf_rbeta(
alpha,
beta); PutRNGstate();
return s;
158{
return Rf_dbeta(x,
alpha,
beta, (
int)
false);}
160{
return Rf_dbeta(x,
alpha,
beta, (
int)
true);}
162{
return Rf_pbeta(t,
alpha,
beta, (
int)
true, (
int)
false);}
164{
return Rf_qbeta(p ,
alpha,
beta, (
int)
true, (
int)
false);}
In this file we define the interface base class IUnivLaw for all probabilities laws.
#define STKDOMAIN_ERROR_2ARG(Where, Arg1, Arg2, Error)
#define _T(x)
Let x unmodified.
Beta(Real const &alpha=.5, Real const &beta=.5)
default constructor.
void setBeta(Real beta)
set the beta value
Real beta_
Second parameter.
virtual Real lpdf(Real const &x) const
void setAlpha(Real alpha)
set the alpha value
Real alpha_
First parameter.
virtual Real icdf(Real const &p) const
virtual Real cdf(Real const &t) const
virtual Real pdf(Real const &x) const
virtual Real rand() const
Interface base class for all the univariate distributions.
virtual Real cdfc(Real const &t) const
calculate the complement of cumulative distribution function, called in statistics the survival funct...
virtual Real lcdfc(Real const &t) const
calculate the log-complement of cumulative distribution function Give the log-probability that a rand...
virtual Real lcdf(Real const &t) const
compute the lower tail log-cumulative distribution function Give the log-probability that a random va...
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
bool isFinite(Type const &x)
utility method allowing to know if a value is a finite value
std::basic_string< Char > String
STK fundamental type of a String.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.