JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.alsUtility
Class RandomGaussianDistribution

java.lang.Object
  extended bygov.nasa.alsUtility.Distribution
      extended bygov.nasa.alsUtility.RandomGaussianDistribution

public class RandomGaussianDistribution
extends Distribution

this class produces random numbers from an interval according to a Gaussian distribution.


Field Summary
protected  double center
          center of the Gaussian distribution
protected  DoubleInterval interval
          the interval from within which random numbers are produced
protected  int size
          the number of numbers in the distribution.
protected  double standardDeviation
          standard deviation of the Gaussian distribution
 
Constructor Summary
RandomGaussianDistribution(int s, DoubleInterval i, double c, double sd)
           
 
Method Summary
 double get(int i)
           
 int size()
          number of values available
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size
the number of numbers in the distribution. Actually, this is ignored by the code.


interval

protected DoubleInterval interval
the interval from within which random numbers are produced


center

protected double center
center of the Gaussian distribution


standardDeviation

protected double standardDeviation
standard deviation of the Gaussian distribution

Constructor Detail

RandomGaussianDistribution

public RandomGaussianDistribution(int s,
                                  DoubleInterval i,
                                  double c,
                                  double sd)
Parameters:
s - the size of the distribution
i - the interval
c - center of the Gaussian
sd - standard deviation of the Gaussian
Method Detail

size

public int size()
Description copied from class: Distribution
number of values available

Specified by:
size in class Distribution

get

public double get(int i)
Specified by:
get in class Distribution
Parameters:
i - for this particular distribution class, this is ignored
Returns:
a random number from within the interval

JavaGenes, NASA Ames. Written largely by Al Globus