Documentation of 'org.jgap.util.randomJava' Java class
randomJava
org.jgap.util

Class randomJava



  • public class randomJava
    extends randomX
    Implementation of a randomX-compliant class based upon the built-in Java.util.Random generator. Note that since the higher level result composition methods are different from those in the (undocumented) standard library, randomJava results will differ from those of the standard library for a given seed.

    Designed and implemented in July 1996 by John Walker, kelvin@fourmilab.ch.

    • Constructor Detail

      • randomJava

        public randomJava()
        Creates a new pseudorandom number generator, seeded from the current time.
      • randomJava

        public randomJava(long seed)
        Creates a new pseudorandom number generator with a specified seed.
        Parameters:
        seed - initial seed for the generator
    • Method Detail

      • setSeed

        public void setSeed(long seed)
        Set seed for generator. Subsequent values will be based on the given seed.
        Parameters:
        seed - seed for the generator
      • nextByte

        public byte nextByte()
        Get next byte from generator. To minimise calls on the underlying Java generator, integers are generated and individual bytes returned on subsequent calls. A call on setSeed() discards any bytes in the buffer.
        Specified by:
        nextByte in class randomX
        Returns:
        the next byte from the generator.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.