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 doublegetVanDerCorputNumber(long index, int base)Return the van-der-Corput number.static voiddoubleThread 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, waitMethods 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:RandomNumberGenerator1DThread safe implementation returning the next double value of this random number generator.- Specified by:
nextDoublein 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
-