Documentation of 'org.jquantlib.math.randomnumbers.RandomNumberGenerator' Java class
RandomNumberGenerator
org.jquantlib.math.randomnumbers

Interface RandomNumberGenerator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      Sample<java.lang.Double> next() 
      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.
    • 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 long variable contains values from 0 to 2^32 than understand that a certain int variable contains negative values that should be converted to it's two's complement and extended to a long variable 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

Ads help maintain this website.