template<typename RealType = double>
class Infinity::Engine::ExtremeValueDistribution< RealType >
Platform-independent extreme value (Gumbel) distribution.
Produces values according to the Type-I extreme value distribution (Gumbel distribution). Used to model the distribution of maximum (or minimum) values in a large sample, making it essential for modeling extreme events and rare occurrences.
The Gumbel distribution appears naturally as the limiting distribution of the maximum (or minimum) of a large number of independent, identically distributed random variables. Common applications include modeling floods, earthquake magnitudes, wind speeds, and other extreme weather events. It also appears in machine learning as the Gumbel-max trick for sampling from categorical distributions.
- Template Parameters
-
| RealType | Floating point type (float or double) |
Example usage:
float value = extreme(rng);
float max_level = flood_max(rng);
for (int i = 0; i < 100; ++i) {
double max_speed = wind_max(rng);
}
Platform-independent extreme value (Gumbel) distribution.
Definition PRNGDistribution.hpp:2300
Pseudo-random number generator for procedural generation.
Definition PRNG.hpp:48
- Note
- Distribution is asymmetric with a longer right tail.
-
Mean = a + γb where γ ≈ 0.5772 (Euler-Mascheroni constant).
-
Mode = a (the most likely value is the location parameter).
-
Variance = (π²/6) * b².
template<typename RealType = double>
template<typename Generator >
Generates the next random value using provided parameters.
Uses the inverse CDF method: X = a - b * ln(-ln(U)) where U ~ Uniform(0, 1) and X ~ Gumbel(a, b).
The double logarithm transformation creates the characteristic long right tail that makes this distribution suitable for modeling extreme maxima.
- Template Parameters
-
| Generator | The random number generator type (e.g., PRNG) |
- Parameters
-
| g | The random number generator |
| param | The distribution parameters to use for this generation |
- Returns
- A random value from Gumbel(param.a(), param.b())