Documentation of 'edu.uci.ics.jung.algorithms.util.NotRandom' Java class
NotRandom
edu.uci.ics.jung.algorithms.util

Class NotRandom

  • All Implemented Interfaces:
    java.io.Serializable


    public class NotRandom
    extends java.util.Random
    A decidedly non-random extension of Random that may be useful for testing random algorithms that accept an instance of Random as a parameter. This algorithm maintains internal counters which are incremented after each call, and returns values which are functions of those counter values. Thus the output is not only deterministic (as is necessarily true of all software with no externalities) but precisely predictable in distribution.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      NotRandom(int size)
      Creates an instance with the specified sample size.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double nextDouble()
      Returns the post-incremented value of the internal counter modulo size, divided by size.
      float nextFloat()
      Returns the post-incremented value of the internal counter modulo size, divided by size.
      int nextInt(int n)
      Returns the post-incremented value of the internal counter modulo n.
      • Methods inherited from class java.util.Random

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

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

      • NotRandom

        public NotRandom(int size)
        Creates an instance with the specified sample size.
        Parameters:
        size - the sample size
    • Method Detail

      • nextInt

        public int nextInt(int n)
        Returns the post-incremented value of the internal counter modulo n.
        Overrides:
        nextInt in class java.util.Random
      • nextDouble

        public double nextDouble()
        Returns the post-incremented value of the internal counter modulo size, divided by size.
        Overrides:
        nextDouble in class java.util.Random
      • nextFloat

        public float nextFloat()
        Returns the post-incremented value of the internal counter modulo size, divided by size.
        Overrides:
        nextFloat in class java.util.Random

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.