|
| | WeibullDistribution () |
| | Default constructor. Creates Weibull(1, 1) distribution.
|
| |
| | WeibullDistribution (RealType a, RealType b=RealType(1)) |
| | Constructs a Weibull distribution with specified parameters.
|
| |
| | WeibullDistribution (const param_type ¶m) |
| | Constructs from a parameter set.
|
| |
| void | reset () |
| | Resets the distribution state.
|
| |
| RealType | a () const |
| | Gets the shape parameter.
|
| |
| RealType | b () const |
| | Gets the scale parameter.
|
| |
| param_type | param () const |
| | Gets the current parameter set.
|
| |
| void | param (const param_type ¶m) |
| | Sets new parameters for the distribution.
|
| |
| result_type | min () const |
| | Gets the minimum value that can be generated (approaches 0).
|
| |
| result_type | max () const |
| | Gets the theoretical maximum value (positive infinity).
|
| |
| template<typename Generator > |
| result_type | operator() (Generator &g) |
| | Generates the next random value using stored parameters.
|
| |
| template<typename Generator > |
| result_type | operator() (Generator &g, const param_type ¶m) |
| | Generates the next random value using provided parameters.
|
| |
template<typename RealType = double>
class Infinity::Engine::WeibullDistribution< RealType >
Platform-independent Weibull distribution.
Produces positive values according to the Weibull distribution with shape parameter a and scale parameter b. Generalizes the exponential distribution and is widely used in reliability analysis and lifetime modeling.
The shape parameter determines the failure rate behavior:
- a < 1: Decreasing failure rate (infant mortality, early failures)
- a = 1: Constant failure rate (exponential distribution, random failures)
- a > 1: Increasing failure rate (wear-out failures, aging)
This makes the Weibull distribution extremely versatile for modeling component lifetimes across different failure modes.
- Template Parameters
-
| RealType | Floating point type (float or double) |
Example usage:
float speed = wind_speed(rng);
float hours_to_failure = lifetime(rng);
double time_to_defect = early_failure(rng);
Pseudo-random number generator for procedural generation.
Definition PRNG.hpp:48
Platform-independent Weibull distribution.
Definition PRNGDistribution.hpp:2124
- Note
- All values are strictly positive.
-
When a = 2, b = sqrt(2), becomes Rayleigh distribution.
-
When a = 1, reduces to exponential distribution with rate 1/b.
-
Mean = b * Γ(1 + 1/a), where Γ is the gamma function.