Package com.github.tommyettinger.random


package com.github.tommyettinger.random
Random number generators and the code they share, such as the EnhancedRandom parent class and the Deserializer that can read back any class here.
  • Class
    Description
    Like TrimRandom with five 64-bit states; does not use multiplication, only add, subtract, XOR, and left-rotate operations.
    Wraps another EnhancedRandom and stores every long it returns from ArchivalWrapper.nextLong() in a LongSequence ArchivalWrapper.archive.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, this uses Integer.numberOfLeadingZeros(int) or its GWT equivalent, and has a period of exactly 2 to the 128.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, Chill32Random is a 32-bit-native generator that doesn't have any shorter subcycles (because it only has one cycle, of length 2 to the 96).
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, this uses only add, bitwise-rotate, and XOR operations (no multiplication).
    A 256-bit "chaotic" generator that also includes an (odd-number) 64-bit stream.
    Allows deserializing any type of EnhancedRandom by looking up its tag in a registry.
    A variant on Java 8's SplittableRandom algorithm, removing the splittable quality so this has one possible stream.
    An EnhancedRandom that delegates to a Distribution to distribute any floats, ints, or doubles as by that distribution.
    One of two possible modes this can use to limit the range of a Distribution.
    A superset of the functionality in Random, meant for random number generators that would be too bare-bones with just Random's methods.
    A hash-on-counters RNG with a period of 2 to the 64 and 2 to the 64 streams.
    A random number generator that is extremely fast on Java 16, and has a very large probable period.
    Not actually a pseudo-random number generator, but a quasi-random number generator, this is an extremely simple way to produce random-seeming numbers with a high distance between one number and the next.
    An annotation for the GWT compiler that makes a piece of code ignored on GWT only.
    An EnhancedRandom that delegates to an Interpolations.Interpolator to distribute output in the same way the Interpolator does from the 0 to 1 range, but for any requested range.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, this is Bob Jenkins' Small Fast Generator, using its 32-bit version.
    A non-random number generator that simply repeats the next of a sequence of long values every time KnownSequenceRandom.nextLong() is called.
    A faster and much-higher-quality substitute for Random.
    Provides 1D noise methods that can be queried at any point on a line to get a continuous random value.
    A very basic append-only list of long items.
    A quasi-random number generator that only changes one bit in its LowChangeQuasiRandom.state per call to LowChangeQuasiRandom.nextLong(), and returns that changed state directly.
    A relatively-simple RNG that's similar to LaserRandom with less correlation between similar initial states, but without the ability to EnhancedRandom.skip(long).
    Like WhiskerRandom, but this has a fifth state that runs like a counter, guaranteeing a minimum period of 2 to the 64.
    An exact copy of PCG-Random's RXS-M-XS generator.
    A four-state EnhancedRandom that uses four different operations to generate each number, one operation per state.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, Respite32Random is a 32-bit-native generator here that doesn't have any shorter subcycles (because it only has one cycle, of length 2 to the 96).
    A wrapper around a different EnhancedRandom object that runs it in reverse, calling EnhancedRandom.previousLong() instead anywhere ReverseWrapper.nextLong() would be called.
    A well-studied RNG that can be quite fast in some circumstances.
    A generator with 4 long states and a guaranteed minimum period of 2 to the 64, this is structured much like WhiskerRandom and is almost as fast.
    A random number generator by Chris Doty-Humphrey, this has four long states, one of which is a counter.
    A random number generator that acts as a counterpart to WhiskerRandom by guaranteeing a slightly longer period and potentially being faster in some situations because it uses no multiplication.
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, this uses only the most portable operations (including compatibility with JS), and has a period of exactly 2 to the 64.
    An unusual RNG that's extremely fast on HotSpot JDK 16 and higher, and still fairly fast on earlier JDKs.
    A random number generator that is very fast on Java 16+, has both a very large probable period and a large guaranteed minimum period, and uses only add, bitwise-rotate, and XOR operations (no multiplication).
    Not actually a pseudo-random number generator, but a quasi-random number generator, this is a fairly simple way to produce values that have some advantages of quasi-random numbers, but works better in some cases than GoldenQuasiRandom.
    Not actually a pseudo-random number generator, but a quasi-random number generator, this is a simple way to produce random-seeming numbers with a high distance between one number and the next.
    The second-fastest generator here on recent JDKs, with a huge probable period but no minimum period guarantee.
    A random number generator that is fairly fast and guarantees 2-dimensional equidistribution (with the exception of the pair with two zeroes in a row, every pair of long results is produced exactly once over the period).
    A random number generator that is optimized for performance on 32-bit machines and with Google Web Toolkit, this uses no multiplication and is identical to the published xoshiro128++ algorithm when generating int values.
    A random number generator that guarantees 4-dimensional equidistribution (except for the quartet with four zeroes in a row, every quartet of long results is produced exactly once over the period).
    A random number generator that is fairly fast and guarantees 4-dimensional equidistribution (except for the quartet with four zeroes in a row, every quartet of long results is produced exactly once over the period).
    An implementation of the Ziggurat method for generating normal-distributed random values.