org.omegahat.Simulation.RandomGenerators
Class DefaultPRNGFactory

java.lang.Object
  |
  +--org.omegahat.Simulation.RandomGenerators.DefaultPRNGFactory
All Implemented Interfaces:
PRNGFactory

public class DefaultPRNGFactory
extends java.lang.Object
implements PRNGFactory

a factory class to create PRNG's from PRNGStates.


Constructor Summary
DefaultPRNGFactory()
           
 
Method Summary
 PRNG instantiate(PRNGState state)
          Instantiate a PRNG of the correct class
static void main(java.lang.String[] argv)
          Test PRNGFactory class by creating a CollingsPRNGState, instantiating it using the Factory, and then generating 10 random integers with the result.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

DefaultPRNGFactory

public DefaultPRNGFactory()
Method Detail

instantiate

public PRNG instantiate(PRNGState state)
                 throws java.lang.Exception
Instantiate a PRNG of the correct class
Specified by:
instantiate in interface PRNGFactory
Parameters:
state - State information used to create the PRNG

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Test PRNGFactory class by creating a CollingsPRNGState, instantiating it using the Factory, and then generating 10 random integers with the result.