37#include "../include/STK_Law_Exponential.h"
52{
return Law::generator.randExp() *
scale_;}
90 if (
t <= 0.)
return 0.0;
104 if ((
p > 1.) || (
p < 0.))
107 if (
p == 0.)
return 0.0;
122 return generator.randExp() * scale;
136 return std::exp(-x/scale) / scale;
150 return (-x / scale) - std::log(scale) ;
162 if (
t <= 0.)
return 0.0;
165 return(1.-exp(-
t/scale));
178 if ((
p > 1.) || (
p < 0.))
181 if (
p == 0.)
return 0.0;
184 return(- scale * log(1.-
p));
#define STKDOMAIN_ERROR_1ARG(Where, Arg, Error)
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.
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.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
bool isNA(Type const &x)
utility method allowing to know if a value is a NA (Not Available) value
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.
static Type NA()
Adding a Non Available (NA) special number.