jsim.variate
Class Uniform

java.lang.Object
  extended by jsim.variate.Variate
      extended by jsim.variate.Uniform

public class Uniform
extends Variate

Uniform random variate generation in which variates are constructed based upon a mean and an interval half width.


Constructor Summary
Uniform(double mean, double hwidth, int i)
          Constructs a Unifrom random variate.
 
Method Summary
 double gen()
          Generate a random number from the Uniform distribution.
 java.lang.Double[] getParameters()
          Get the parameters of the constuctor
 
Methods inherited from class jsim.variate.Variate
incStream, printName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Uniform

public Uniform(double mean,
               double hwidth,
               int i)
Constructs a Unifrom random variate.

Parameters:
mean - mean value (alpha parameter)
hwidth - interval half width (beta parameter)
i - random number stream
Method Detail

getParameters

public java.lang.Double[] getParameters()
Get the parameters of the constuctor

Overrides:
getParameters in class Variate

gen

public double gen()
Generate a random number from the Uniform distribution.

Overrides:
gen in class Variate
Returns:
double random number from Uniform distribution