public class StableRandomGenerator extends java.lang.Object implements NormalizedRandomGenerator
This class provides a stable normalized random generator. It samples from a stable distribution with location parameter 0 and scale 1.
The implementation uses the Chambers-Mallows-Stuck method as described in Handbook of computational statistics: concepts and methods by James E. Gentle, Wolfgang Härdle, Yuichi Mori.
| Modifier and Type | Field and Description |
|---|---|
private double |
alpha
stability parameter
|
private double |
beta
skewness parameter
|
private RandomGenerator |
generator
Underlying generator.
|
private double |
zeta
cache of expression value used in generation
|
| Constructor and Description |
|---|
StableRandomGenerator(RandomGenerator generator,
double alpha,
double beta)
Create a new generator.
|
| Modifier and Type | Method and Description |
|---|---|
double |
nextNormalizedDouble()
Generate a random scalar with zero location and unit scale.
|
private final RandomGenerator generator
private final double alpha
private final double beta
private final double zeta
public StableRandomGenerator(RandomGenerator generator, double alpha, double beta) throws NullArgumentException, OutOfRangeException
generator - underlying random generator to usealpha - Stability parameter. Must be in range (0, 2]beta - Skewness parameter. Must be in range [-1, 1]NullArgumentException - if generator is nullOutOfRangeException - if alpha <= 0 or alpha > 2
or beta < -1 or beta > 1public double nextNormalizedDouble()
nextNormalizedDouble in interface NormalizedRandomGeneratorCopyright (c) 2003-2015 Apache Software Foundation