org.jquantlib.math.randomnumbers
Interface RandomNumberGenerator
-
- All Known Implementing Classes:
- MersenneTwisterUniformRng
public interface RandomNumberGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Sample<java.lang.Double>next()longnextInt32()Once JVM does not support unsigned fixed arithmetic, we use 64bit variables as containers for 32bit values in order to reduce the complexity and performance overhead of certain fixed arithmetic operations.
-
-
-
Method Detail
-
next
Sample<java.lang.Double> next()
- Returns:
- another random number
-
nextInt32
long nextInt32()
Once JVM does not support unsigned fixed arithmetic, we use 64bit variables as containers for 32bit values in order to reduce the complexity and performance overhead of certain fixed arithmetic operations.From the user's perspective, it's easier to understand that a certain
longvariable contains values from 0 to 2^32 than understand that a certainintvariable contains negative values that should be converted to it's two's complement and extended to alongvariable before use.- Returns:
- an unsigned 32bit wide number encapsulated in a 64bit container
- See Also:
- Bug 4504839, Java and Unsigned Types, Two's complement
-
-
DataMelt 3.0 © DataMelt by jWork.ORG