|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.Random
edu.gvsu.GVrandom
public class GVrandom
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.
| 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 |
|---|
public GVrandom()
| Method Detail |
|---|
public int nextPoisson(double lambda)
lambda - the desired mean
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||