public class HaltonSequence extends Object implements RandomNumberGenerator
Constructor and Description |
---|
HaltonSequence(int[] base)
Constructs a Halton sequence with the given bases.
|
Modifier and Type | Method and Description |
---|---|
int |
getDimension() |
double[] |
getHaltonNumber(long index) |
double |
getHaltonNumber(long index,
int dimension) |
static double |
getHaltonNumberForGivenBase(long index,
int base)
Return a Halton number, sequence starting at index = 0, base > 1.
|
double[] |
getNext() |
public HaltonSequence(int[] base)
base
- The array of base integers. The length of the array defines the dimension of the sequence.public double[] getNext()
getNext
in interface RandomNumberGenerator
public int getDimension()
getDimension
in interface RandomNumberGenerator
public double[] getHaltonNumber(long index)
public double getHaltonNumber(long index, int dimension)
public static double getHaltonNumberForGivenBase(long index, int base)
index
- The index of the sequence.base
- The base of the sequence. Has to be greater than one (this is not checked).Copyright © 2019. All rights reserved.