edu.gvsu
Class GVrandom

java.lang.Object
  extended by java.util.Random
      extended by edu.gvsu.GVrandom
All Implemented Interfaces:
java.io.Serializable

public class GVrandom
extends java.util.Random

Extends the functionality of java.util.Random by providing a method to generate the next random value in a Poisson process. One characteristic of the Poisson distribution is that the mean of many generated values equals the variance.

Adapted from code posted on the Web by Charles Stanton at www.math.csusb.edu/faculty/stanton/probstat/poisson.html

Refer to the documentation for java.util.Raondom for the inherited methods.

See Also:
Serialized Form

Constructor Summary
GVrandom()
           
 
Method Summary
 int nextPoisson(double lambda)
          Calculates a random integer using the poisson distrubution about the desired mean.
 
Methods inherited from class java.util.Random
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GVrandom

public GVrandom()
Method Detail

nextPoisson

public int nextPoisson(double lambda)
Calculates a random integer using the poisson distrubution about the desired mean.

Parameters:
lambda - the desired mean