|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--cern.colt.PersistentObject
|
+--cern.jet.random.AbstractDistribution
|
+--cern.jet.random.AbstractContinousDistribution
|
+--cern.jet.random.Wald
Wald distribution; also called Inverse Gaussian distribution;
p(x) = sqrt(lambda/(2*pi*x^3)) * exp(-lambda*(x-mu)^2/(2*mu^2*x))
Valid parameter ranges: x,lambda > 0.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Implementation:
| Field Summary | |
protected double |
ch2
|
protected double |
lam
|
protected double |
mu
|
protected static Wald |
shared
|
| Fields inherited from class cern.jet.random.AbstractDistribution |
randomGenerator |
| Constructor Summary | |
Wald(double m,
double l,
RandomElement randomGenerator)
Constructs a Wald distribution. |
|
| Method Summary | |
double |
cdf(double x,
double y)
Returns the cumulative distribution function. |
double |
nextCh2(double freedom)
|
double |
nextDouble()
Returns a random number from the distribution. |
double |
nextDouble(double u,
double lambda)
Returns a random number from the distribution; bypasses the internal state. |
double |
pdf(double x)
Returns the probability distribution function. |
void |
setState(double u,
double lambda)
Sets the distribution parameter. |
static double |
staticNextDouble(double u,
double lambda)
Returns a random number from the distribution. |
java.lang.String |
toString()
Returns a String representation of the receiver. |
| Methods inherited from class cern.jet.random.AbstractDistribution |
apply, apply, clone, getRandomGenerator, makeDefaultGenerator, nextInt, setRandomGenerator |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double mu
protected double lam
protected double ch2
protected static Wald shared
| Constructor Detail |
public Wald(double m,
double l,
RandomElement randomGenerator)
m - mean value.l - scale parameter.
java.lang.IllegalArgumentException - if mu, lambda < 0.0.| Method Detail |
public double cdf(double x,
double y)
public double nextDouble()
nextDouble in class AbstractDistribution
public double nextDouble(double u,
double lambda)
u - mean parameterlambda - scale parameter
It should hold mu, lambda > 0.public double nextCh2(double freedom)
public double pdf(double x)
public void setState(double u,
double lambda)
u - mean parameter^Mlambda - scale parameter^M
public static double staticNextDouble(double u,
double lambda)
u - mean parameter^Mlambda - scale parameter^Mpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||