com.x8ing.mc.distribution
Class RandomDistributionGauss

java.lang.Object
  extended by com.x8ing.mc.distribution.RandomDistributionGauss
All Implemented Interfaces:
RandomDistribution

public class RandomDistributionGauss
extends java.lang.Object
implements RandomDistribution

Uses an open library by cern.ch

http://spi.cern.ch/extsoft/packages.php?pkg=Colt

http://dsd.lbl.gov/~hoschek/colt/

Author:
Patrick Heusser

Constructor Summary
RandomDistributionGauss(double min, double max, int nStdDeviations)
           nStdDeviations = percentage
1 = 0.682689492137
2 = 0.954499736104
3 = 0.997300203937
4 = 0.999936657516
5 = 0.999999426697
6 = 0.999999998027
 
Method Summary
 double getNextRandomNumber()
          Returns the the distribution normalized between 0..1 and the the values 0...1.
 void init(double min, double max, int nStdDeviations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomDistributionGauss

public RandomDistributionGauss(double min,
                               double max,
                               int nStdDeviations)

nStdDeviations = percentage
1 = 0.682689492137
2 = 0.954499736104
3 = 0.997300203937
4 = 0.999936657516
5 = 0.999999426697
6 = 0.999999998027

Parameters:
min - the minimal return value
max - the maximum return value
nStdDeviations: - e.g. 1,2,3 etc... as described above..
Method Detail

init

public void init(double min,
                 double max,
                 int nStdDeviations)

getNextRandomNumber

public double getNextRandomNumber()
Description copied from interface: RandomDistribution
Returns the the distribution normalized between 0..1 and the the values 0...1.

Specified by:
getNextRandomNumber in interface RandomDistribution
Returns:
See Also:
RandomDistribution.getNextRandomNumber()


by Patrick Heusser