Documentation of 'org.uncommons.maths.random.CellularAutomatonRNG' Java class
CellularAutomatonRNG
org.uncommons.maths.random

Class CellularAutomatonRNG

  • All Implemented Interfaces:
    java.io.Serializable, RepeatableRNG


    public class CellularAutomatonRNG
    extends java.util.Random
    implements RepeatableRNG

    Java port of the cellular automaton pseudorandom number generator developed by Tony Pasqualoni.

    NOTE: Instances of this class do not use the seeding mechanism inherited from Random. Calls to the Random.setSeed(long) method will have no effect. Instead the seed must be set by a constructor.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] getSeed()
      int next(int bits)
      • Methods inherited from class java.util.Random

        doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CellularAutomatonRNG

        public CellularAutomatonRNG()
        Creates a new RNG and seeds it using the default seeding strategy.
      • CellularAutomatonRNG

        public CellularAutomatonRNG(SeedGenerator seedGenerator)
                             throws SeedException
        Seed the RNG using the provided seed generation strategy.
        Parameters:
        seedGenerator - The seed generation strategy that will provide the seed value for this RNG.
        Throws:
        SeedException - If there is a problem generating a seed.
      • CellularAutomatonRNG

        public CellularAutomatonRNG(byte[] seed)
        Creates an RNG and seeds it with the specified seed data.
        Parameters:
        seed - The seed data used to initialise the RNG.
    • Method Detail

      • next

        public int next(int bits)
        Overrides:
        next in class java.util.Random
      • getSeed

        public byte[] getSeed()
        Specified by:
        getSeed in interface RepeatableRNG
        Returns:
        The seed data used to initialise this pseudo-random number generator.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.