|
| | CauchyDistribution () |
| | Default constructor. Creates standard Cauchy distribution (a=0, b=1).
|
| |
| | CauchyDistribution (RealType a, RealType b=RealType(1)) |
| | Constructs a Cauchy distribution with specified parameters.
|
| |
| | CauchyDistribution (const param_type ¶m) |
| | Constructs from a parameter set.
|
| |
| void | reset () |
| | Resets the distribution state.
|
| |
| RealType | a () const |
| | Gets the location 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 theoretical minimum value (negative infinity).
|
| |
| 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::CauchyDistribution< RealType >
Platform-independent Cauchy (Lorentz) distribution.
Produces values according to the Cauchy distribution, which has heavy tails and undefined mean and variance. Useful for modeling phenomena with extreme outliers or when you need occasional very large values.
The Cauchy distribution is notable for having no defined moments - the mean, variance, and higher moments do not exist mathematically. This makes it useful for modeling phenomena where extreme values occur much more frequently than in a normal distribution, such as resonance phenomena in physics or certain financial models.
- Template Parameters
-
| RealType | Floating point type (float or double) |
Example usage:
float value = standard(rng);
float shifted = custom(rng);
for (int i = 0; i < 100; ++i) {
double val = outliers(rng);
}
Platform-independent Cauchy (Lorentz) distribution.
Definition PRNGDistribution.hpp:923
Pseudo-random number generator for procedural generation.
Definition PRNG.hpp:48
- Note
- Heavy-tailed: extreme values occur much more frequently than in normal distribution.
-
Mean and variance are undefined (do not exist mathematically).
-
The median and mode both equal the location parameter a.
- Warning
- Sample mean does not converge to any value as sample size increases.