
@Reference(title="Randomized halton sequences", authors="Wang, X. and Hickernell, F.J.", booktitle="Mathematical and Computer Modelling Vol. 32 (7)", url="http://dx.doi.org/10.1016/S0895-7177(00)00178-3") public class HaltonUniformDistribution extends Object implements DistributionWithRandom
 Randomized halton sequences
 Wang, X. and Hickernell, F.J.
 Mathematical and Computer Modelling Vol. 32 (7)
 
| Modifier and Type | Field and Description | 
|---|---|
| private static double | ALMOST_ONEThreshold | 
| (package private) short | baseBase value | 
| (package private) int | counterCounter, for max iterations of fast function. | 
| (package private) double | currentCurrent value | 
| (package private) double | invbaseInverse of base, for faster division by multiplication. | 
| (package private) long | inverseInteger inverse | 
| private double | lenLen := max - min | 
| (package private) double | logbaseLogarithm of base. | 
| private double | maxMaximum | 
| private static int | MAXFASTMaximum number of iterations of fast variant | 
| (package private) int | maxiMaximum integer to use | 
| private double | minMinimum | 
| Constructor and Description | 
|---|
| HaltonUniformDistribution(double min,
                         double max)Constructor for a halton pseudo uniform distribution on the interval [min,
 max[ | 
| HaltonUniformDistribution(double min,
                         double max,
                         int base,
                         double seed)Constructor for a halton pseudo uniform distribution on the interval [min,
 max[ | 
| HaltonUniformDistribution(double min,
                         double max,
                         Random rnd)Constructor for a halton pseudo uniform distribution on the interval [min,
 max[ | 
| Modifier and Type | Method and Description | 
|---|---|
| double | cdf(double val)Return the cumulative density function at the given value. | 
| private static int | choosePrime(Random rnd)Choose a random prime. | 
| double | getMax() | 
| double | getMin() | 
| private long | inverse(double current)Compute the inverse with respect to the given base. | 
| private double | nextRadicalInverse()Compute the next radical inverse. | 
| double | nextRandom()Generate a new random value | 
| double | pdf(double val)Return the density of an existing value | 
| double | quantile(double val)Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function. | 
| private double | radicalInverse(long i)Compute the radical inverse of i. | 
| String | toString()Describe the distribution | 
private double min
private double max
private double len
private static final int MAXFAST
private static final double ALMOST_ONE
final short base
final double invbase
final double logbase
final int maxi
int counter
double current
long inverse
public HaltonUniformDistribution(double min,
                         double max,
                         int base,
                         double seed)
min - Minimum valuemax - Maximum valuebase - Base valueseed - Random seed (starting value)public HaltonUniformDistribution(double min,
                         double max)
min - Minimum valuemax - Maximum valuepublic HaltonUniformDistribution(double min,
                         double max,
                         Random rnd)
min - Minimum valuemax - Maximum valuernd - Random generatorprivate static int choosePrime(Random rnd)
rnd - Random generatorpublic double pdf(double val)
Distributionpdf in interface Distributionval - existing valuepublic double cdf(double val)
Distributioncdf in interface Distributionval - existing valuepublic double quantile(double val)
Distributionquantile in interface Distributionval - Quantile to findprivate long inverse(double current)
current - Current valueprivate double radicalInverse(long i)
i - Input long valueprivate double nextRadicalInverse()
public double nextRandom()
DistributionWithRandomnextRandom in interface DistributionWithRandompublic String toString()
DistributiontoString in interface DistributiontoString in class Objectpublic double getMin()
public double getMax()