35#ifndef STK_LAW_CAUCHY_H
36#define STK_LAW_CAUCHY_H
211GetRNGstate();
Real s = Rf_rcauchy(
mu,
scale); PutRNGstate();
return s;
215{
return Rf_dcauchy(x,
mu,
scale,
false);}
217{
return Rf_dcauchy(x,
mu,
scale,
true);}
219{
return Rf_pcauchy(t,
mu,
scale,
true,
false);}
221{
return Rf_qcauchy(p ,
mu,
scale,
true,
false);}
In this file we define the interface base class IUnivLaw for all probabilities laws.
#define STKRUNTIME_ERROR_1ARG(Where, Arg, Error)
#define STKDOMAIN_ERROR_2ARG(Where, Arg1, Arg2, Error)
#define _T(x)
Let x unmodified.
virtual Real pdf(Real const &x) const
Cauchy(Real const &mu=0, Real const &scale=1)
Default constructor.
void setMu(Real const &mu)
Real scale_
The scale parameter.
virtual Real rand() const
Generate a pseudo Cauchy random variate.
virtual ~Cauchy()
Destructor.
Real const & scale() const
virtual Real lpdf(Real const &x) const
virtual Real cdf(Real const &t) const
The cumulative distribution function of the Cauchy distribution at t is.
Real mu_
The mu parameter.
void setScale(Real const &scale)
virtual Real icdf(Real const &p) const
The inverse cumulative distribution function at p is.
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.