artofillusion.math
Class FastRandom

java.lang.Object
  extended by java.util.Random
      extended by artofillusion.math.FastRandom
All Implemented Interfaces:
java.io.Serializable

public class FastRandom
extends java.util.Random

This is a faster replacement for java.util.Random. It produces identical results. Unlike java.util.Random, this class is not thread safe, so a FastRandom object should never be accessed simultaneously from multiple threads.

See Also:
Serialized Form

Constructor Summary
FastRandom(long seed)
          Create a new random number generator.
 
Method Summary
 void setSeed(long seed)
          Set the seed value.
 
Methods inherited from class java.util.Random
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastRandom

public FastRandom(long seed)
Create a new random number generator.

Parameters:
seed - the initial seed value
Method Detail

setSeed

public void setSeed(long seed)
Set the seed value.

Overrides:
setSeed in class java.util.Random


Copyright © 1999-2011 by Peter Eastman.