35#ifndef STK_LAW_WEIBULL_H
36#define STK_LAW_WEIBULL_H
73 inline Real const&
k()
const {
return k_;}
177GetRNGstate();
Real s = Rf_rweibull(
k,
lambda); PutRNGstate();
return s;
181{
return Rf_dweibull(x,
k,
lambda,
false);}
183{
return Rf_dweibull(x,
k,
lambda,
true);}
185{
return Rf_pweibull(t,
k,
lambda,
true,
false);}
187{
return Rf_qweibull(p,
k,
lambda,
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.
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...
Weibull distribution law.
virtual ~Weibull()
destructor
Real lambda_
The scale parameter.
virtual Real pdf(Real const &x) const
Weibull(Real const &k=1., Real const &lambda=1.)
Default constructor.
virtual Real lpdf(Real const &x) const
Real const & lambda() const
void setLambda(Real const &lambda)
Real k_
The shape parameter.
virtual Real rand() const
virtual Real icdf(Real const &p) const
The quantile (inverse cumulative distribution) function for the Weibull distribution is .
virtual Real cdf(Real const &t) const
The cumulative distribution function for the Weibull distribution is .
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.