laur.rand
Class RandomPoissonDistribution

java.lang.Object
  |
  +--laur.rand.RandomPoissonDistribution

public class RandomPoissonDistribution
extends java.lang.Object

A generator of random numbers with Poisson distribution.


Constructor Summary
RandomPoissonDistribution(long mean)
          Create a new generator of random numbers with Poisson distribution of specified mean.
RandomPoissonDistribution(long mean, java.util.Random randgen)
          Create a new generator of random numbers with Poisson distribution of specified mean and that uses randgen as a source of random numbers.
 
Method Summary
static void main(java.lang.String[] args)
          sample usage and testing
 long nextLong()
          Return a random number with Poisson distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomPoissonDistribution

public RandomPoissonDistribution(long mean)
Create a new generator of random numbers with Poisson distribution of specified mean.
Parameters:
mean - the mean of the Poisson distribution

RandomPoissonDistribution

public RandomPoissonDistribution(long mean,
                                 java.util.Random randgen)
Create a new generator of random numbers with Poisson distribution of specified mean and that uses randgen as a source of random numbers.
Parameters:
mean - the mean of the Poisson distribution
randgen - a Random object to be used by the generator.
Method Detail

nextLong

public long nextLong()
Return a random number with Poisson distribution.

main

public static void main(java.lang.String[] args)
sample usage and testing