Documentation of 'umontreal.iro.lecuyer.rng.BasicRandomStreamFactory' Java class
BasicRandomStreamFactory
umontreal.iro.lecuyer.rng

Class BasicRandomStreamFactory

  • All Implemented Interfaces:
    RandomStreamFactory


    public class BasicRandomStreamFactory
    extends java.lang.Object
    implements RandomStreamFactory
    Represents a basic random stream factory that can constructs new instances of a given RandomStream implementation via the newInstance method. The class name of the implementation to be used must be passed to the constructor as a String, which must be the name of a nullary constructor of a RandomStream object (i.e., a constructor that has no parameters). The streams are constructed by the factory by reflection from this String.
    • Constructor Summary

      Constructors 
      Constructor and Description
      BasicRandomStreamFactory(java.lang.Class rsClass)
      Constructs a new basic random stream factory with random stream class rsClass.
    • Constructor Detail

      • BasicRandomStreamFactory

        public BasicRandomStreamFactory(java.lang.Class rsClass)
        Constructs a new basic random stream factory with random stream class rsClass. The supplied class object must represent an implementation of RandomStream and must provide a nullary constructor. For example, to construct a factory producing MRG32k3a random streams, this constructor must be called with MRG33k3a.class.
        Parameters:
        rsClass - the random stream class being used.
        Throws:
        java.lang.NullPointerException - if rsClass is null.
        java.lang.IllegalArgumentException - if rsClass does not represent an implementation of RandomStream, or does not provide a nullary constructor.
    • Method Detail

      • getRandomStreamClass

        public java.lang.Class getRandomStreamClass()
        Returns the random stream class associated with this object.
        Returns:
        the associated random stream class.
      • setRandomStreamClass

        public void setRandomStreamClass(java.lang.Class rsClass)
        Sets the associated random stream class to rsClass. The supplied class object must represent an implementation of RandomStream and must provide a nullary constructor.
        Parameters:
        rsClass - the random stream class being used.
        Throws:
        java.lang.NullPointerException - if rsClass is null.
        java.lang.IllegalArgumentException - if rsClass does not represent an implementation of RandomStream, or does not provide a nullary constructor.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.