35#ifndef STK_LAW_EXPONENTIAL_H
36#define STK_LAW_EXPONENTIAL_H
166GetRNGstate();
Real s = Rf_rexp(scale); PutRNGstate();
return s;
170{
return Rf_dexp(x, scale,
false);}
172{
return Rf_dexp(x, scale,
true);}
174{
return Rf_pexp(t, scale,
true,
false);}
176{
return Rf_qexp(p, scale,
true,
false);}
In this file we define the interface base class IUnivLaw for all probabilities laws.
#define STKDOMAIN_ERROR_1ARG(Where, Arg, Error)
#define _T(x)
Let x unmodified.
Exponential distribution law.
virtual Real pdf(Real const &x) const
Give the value of the pdf at x.
virtual Real rand() const
Generate a pseudo Exponential random variate.
Exponential(Real const &scale=1)
constructor.
virtual Real cdf(Real const &t) const
The cumulative distribution function is.
virtual Real icdf(Real const &p) const
The inverse cumulative distribution function is.
virtual Real lpdf(Real const &x) const
Give the value of the log-pdf at x.
Real scale_
The scale parameter.
virtual ~Exponential()
destructor.
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...
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.
Arithmetic properties of STK fundamental types.