45 template<
typename realT>
55 for(
int i=0; i< n; ++i) lambda += pow( x[i] - x0,
k);
59 return pow(lambda, 1.0/
k);
80 template<
typename realT>
87 if(x - x0 < 0)
return 0.0;
89 realT rat = (x-x0)/lambda;
91 return (
k/lambda) * pow(rat,
k-1) * exp( -pow(rat,
k) );
115 template<
typename realT>
121 return weibull(x,
static_cast<realT
>(0),
k, lambda);
constexpr units::realT k()
Boltzmann Constant.
realT weibull(realT x, realT k, realT lambda)
The Weibull distribution at a point.
realT weibull_lambda(std::vector< realT > &x, realT k, realT x0=0)
The MLE of the Weibull distribution lambda parameter.