|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.variate.Variate jsim.variate.Binomial
public class Binomial
Binomial random variate generation.
Constructor Summary | |
---|---|
Binomial(double n,
double p,
int i)
Constructs a Binomial random variate. |
|
Binomial(int n,
double p,
int i)
Constructs a Binomial random variate. |
Method Summary | |
---|---|
double |
gen()
Generate a random number from binomial 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 |
---|
public Binomial(int n, double p, int i)
n
- number of trialsp
- probability of successpublic Binomial(double n, double p, int i)
n
- number of trials (passed in as double,
will get truncated to int)p
- probability of successMethod Detail |
---|
public java.lang.Double[] getParameters()
getParameters
in class Variate
public double gen()
gen
in class Variate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |