java.lang.Object
net.finmath.randomnumbers.SobolSequence
- All Implemented Interfaces:
Serializable
,RandomNumberGenerator
Implements a multi-dimensional Sobol sequence.
The class is just a wrapper to Apache commons-math implementation
in order to implement the interface
RandomNumberGenerator
with a minimal change. The value 0, the first element of the sequence, is omitted.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionSobolSequence(int dimension)
Constructs a Sobol sequence with given dimension. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the sample vector dimension.double[]
getNext()
Get the next sample vector of dimension n, where n isgetDimension
.
-
Constructor Details
-
SobolSequence
public SobolSequence(int dimension)Constructs a Sobol sequence with given dimension.- Parameters:
dimension
- The dimension of the sequence.
-
-
Method Details
-
getNext
public double[] getNext()Description copied from interface:RandomNumberGenerator
Get the next sample vector of dimension n, where n isgetDimension
. An implementation has to be thread safe.- Specified by:
getNext
in interfaceRandomNumberGenerator
- Returns:
- The next sample vector of dimension n, where n is
getDimension
.
-
getDimension
public int getDimension()Description copied from interface:RandomNumberGenerator
Get the sample vector dimension.- Specified by:
getDimension
in interfaceRandomNumberGenerator
- Returns:
- The sample vector dimension n.
-