jsim.variate
Class Geometric

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

public class Geometric
extends Variate

Geometric random variate generation.


Constructor Summary
Geometric(double p, int i)
          Constructs a Geometric random variable.
 
Method Summary
 double gen()
          Generate a random number from the geometric 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

Geometric

public Geometric(double p,
                 int i)
Constructs a Geometric random variable.

Parameters:
p - event probability
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 geometric distribution.

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