org.statcato.random
Class NormalSample

java.lang.Object
  extended by java.util.Random
      extended by org.statcato.random.NormalSample
All Implemented Interfaces:
java.io.Serializable

public class NormalSample
extends java.util.Random

A random sampler for a normal distribution, defined by the mean and standard deviation.

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau
See Also:
Serialized Form

Constructor Summary
NormalSample(double mean, double stdev)
          Constructor.
 
Method Summary
 double nextSample()
          Returns the next random sample
 
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

NormalSample

public NormalSample(double mean,
                    double stdev)
Constructor.

Parameters:
mean - mean of the normal distribution
stdev - standard deviation of the normal distribution
Method Detail

nextSample

public double nextSample()
Returns the next random sample

Returns:
double