- java.lang.Object
-
- net.finmath.randomnumbers.VanDerCorputSequence
-
- All Implemented Interfaces:
Serializable,DoubleSupplier,RandomNumberGenerator,RandomNumberGenerator1D
public class VanDerCorputSequence extends Object implements RandomNumberGenerator1D
A van-der-Corput sequence \( \{ x_{i} \vert i = 0, 1, \ldots \} \) implementingRandomNumberGenerator1D.- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VanDerCorputSequence(int base)VanDerCorputSequence(int startIndex, int base)Create a van-der-Corput sequence for a given start index and base.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doublegetVanDerCorputNumber(long index, int base)Return the van-der-Corput number.static voidmain(String[] args)doublenextDouble()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 Detail
-
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 Detail
-
main
public static void main(String[] args)
-
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
-
-