mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Utilities for working with the Weibull Distribution.
Functions | |
template<typename realT > | |
realT | mx::math::func::weibull_lambda (std::vector< realT > &x, realT k, realT x0=0) |
The MLE of the Weibull distribution lambda parameter. More... | |
template<typename realT > | |
realT | mx::math::func::weibull (realT x, realT x0, realT k, realT lambda) |
The general shifted Weibull distribution at a point. More... | |
template<typename realT > | |
realT | mx::math::func::weibull (realT x, realT k, realT lambda) |
The Weibull distribution at a point. More... | |
realT mx::math::func::weibull | ( | realT | x, |
realT | k, | ||
realT | lambda | ||
) |
The Weibull distribution at a point.
Calculates the value of the Weibull distribution at a location specified by x.
\[ f(x; \lambda, k) = \begin{cases} \frac{k}{\lambda}\left( \frac{x}{\lambda}\right)^{k-1} \exp \left( -\left(\frac{x}{\lambda}\right)^k \right), & x \ge 0 \\ 0, & x < 0 \end{cases} \]
realT | a real floating point type |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | x | the location at which to calculate the distribution |
[in] | k | the shape parameter |
[in] | lambda | the scale parameter |
Definition at line 116 of file weibull.hpp.
References mx::astro::constants::k().
realT mx::math::func::weibull | ( | realT | x, |
realT | x0, | ||
realT | k, | ||
realT | lambda | ||
) |
The general shifted Weibull distribution at a point.
Calculates the value of the Weibull distribution at a location specified by x.
\[ f(x; x_o, \lambda, k) = \begin{cases} \frac{k}{\lambda}\left( \frac{x-x_o}{\lambda}\right)^{k-1} \exp \left( -\left(\frac{x-x_o}{\lambda}\right)^k \right), & x \ge 0 \\ 0, & x < 0 \end{cases} \]
realT | a real floating point type |
[in] | x | the location at which to calculate the distribution |
[in] | x0 | the location parameter |
[in] | k | the shape parameter |
[in] | lambda | the scale parameter |
Definition at line 81 of file weibull.hpp.
References mx::astro::constants::k().
realT mx::math::func::weibull_lambda | ( | std::vector< realT > & | x, |
realT | k, | ||
realT | x0 = 0 |
||
) |
The MLE of the Weibull distribution lambda parameter.
realT | a real floating point type |
[in] | x | the data points |
[in] | k | the shape parameter |
[in] | x0 | [optional] the location parameter |
Definition at line 46 of file weibull.hpp.
References mx::astro::constants::k().