cppannotations/yo/stl/weibull.yo
2010-12-19 10:51:50 +00:00

42 lines
1.6 KiB
Text

The ti(weibull_distribution<RealType = double>) is commonly used in
reliability engineering and in survival (life data) analysis.
It has two or three parameters and the two-parameter variant is offered by the
STL. The three parameter variant has a shape (or slope) parameter, a scale
parameter and a location parameter. The two parameter variant implicitly uses
the location parameter value 0. In the two parameter variant the shape
parameter (a) and the scale parameter (b) are provided. See
tlurl(http://www.weibull.com/hotwire/issue14/relbasics14.htm) for an
interesting coverage of the meaning of the Weibull distribution's parameters.
Defined types:
verb(
typedef RealType result_type;
struct param_type
{
explicit param_type(RealType a = RealType(1),
RealType b = RealType(1));
RealType a() const; // the shape (slope) parameter
RealType b() const; // the scale parameter
};
)
Constructors and members:
itemization(
itt(weibull_distribution<>(RealType a = 1, RealType b = 1))
constructs a weibull distribution with specified tt(a) and tt(b)
parameters;
itt(weibull_distribution<>(param_type const &param))
constructs a weibull distribution according to the values stored in
the tt(param) struct.
itt(IntType a() const)nl()
returns the distribution's shape (or slope) parameter;
itt(IntType stddev() const)nl()
returns the distribution's scale parameter;
itt(result_type min() const)nl()
returns 0;
itt(result_type max() const)nl()
returns the maximum value of tt(result_type);
)