12 #include "libmesh/utility.h"
22 params.addClassDescription(
"Three-parameter Weibull distribution.");
23 params.addRequiredParam<Real>(
"location",
"Location parameter (a or low)");
24 params.addRequiredRangeCheckedParam<Real>(
"scale",
"scale > 0",
"Scale parameter (b or lambda)");
25 params.addRequiredRangeCheckedParam<Real>(
"shape",
"shape > 0",
"Shape parameter (c or k)");
30 : Distribution(parameters),
31 _a(getParam<Real>(
"location")),
32 _b(getParam<Real>(
"scale")),
33 _c(getParam<Real>(
"shape"))
39 const Real & location,
47 const Real y = (x - location) / scale;
48 return shape / scale *
std::pow(y, shape - 1.0) * std::exp(-
std::pow(y, shape));
54 const Real & location,
62 const Real y = (x - location) / scale;
63 return 1.0 - std::exp(-
std::pow(y, shape));
69 const Real & location,
73 return location + scale *
std::pow(-std::log(1 - p), 1.0 / shape);
79 TIME_SECTION(_perf_pdf);
86 TIME_SECTION(_perf_cdf);
93 TIME_SECTION(_perf_quantile);