java.lang.Object
net.finmath.randomnumbers.VanDerCorputSequence
- All Implemented Interfaces:
Serializable
,DoubleSupplier
,RandomNumberGenerator
,RandomNumberGenerator1D
A van-der-Corput sequence \( \{ x_{i} \vert i = 0, 1, \ldots \} \) implementing
RandomNumberGenerator1D
.- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionVanDerCorputSequence(int base)
VanDerCorputSequence(int startIndex, int base)
Create a van-der-Corput sequence for a given start index and base. -
Method Summary
Modifier and TypeMethodDescriptionstatic double
getVanDerCorputNumber(long index, int base)
Return the van-der-Corput number.static void
double
Thread safe implementation returning the next double value of this random number generator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.finmath.randomnumbers.RandomNumberGenerator1D
getAsDouble, getDimension, getNext, nextDoubleFast
-
Constructor Details
-
VanDerCorputSequence
public VanDerCorputSequence(int startIndex, int base)Create a van-der-Corput sequence for a given start index and base.- Parameters:
startIndex
- The start index. Must be ≥ 0.base
- The base of the sequence. Must be > 1.
-
VanDerCorputSequence
public VanDerCorputSequence(int base)
-
-
Method Details
-
main
-
nextDouble
public double nextDouble()Description copied from interface:RandomNumberGenerator1D
Thread safe implementation returning the next double value of this random number generator.- Specified by:
nextDouble
in interfaceRandomNumberGenerator1D
- Returns:
- The next double value of this random number generator
-
getVanDerCorputNumber
public static double getVanDerCorputNumber(long index, int base)Return the van-der-Corput number.- Parameters:
index
- The index of the sequence starting with 0base
- The base.- Returns:
- The van der Corput number
-