|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.omegahat.Probability.Distributions.DistributionFunctions
sir.util.Distributions
Class extending the set of distributions. In the Hydra package all distributions are in one file not OO-split. Bad! Should use the CERN package for this!
Current extension consists of the gamma distribution with both scale and shape parameter. And incomplete gamma function.
PRNGDistributionFunctions
Field Summary |
Fields inherited from class org.omegahat.Probability.Distributions.DistributionFunctions |
geometricRand_beta, geometricRand_last_p |
Constructor Summary | |
Distributions(org.omegahat.Simulation.RandomGenerators.PRNG prng_in)
Constructor |
Method Summary | |
double |
gammaCDF(double q,
double alpha,
double beta)
CDF i.e. probability function of a Ga(alpha,beta) distribution |
double |
gammaPDF(double x,
double alpha,
double beta)
Find pdf value at X=x, when X~\Gamma(alpha,beta), i.e. |
double |
gammaQuantile(double p,
double alpha,
double beta)
Quantile of a Ga(p,alpha,beta) distribution (i.e. inverse of CDF) |
double |
gammaRand(double alpha,
double beta)
Sample X ~ Gamma(alpha,beta) , s.t. |
double |
gammaSurv(double x,
double alpha,
double beta)
Survival function S(t) of the gamma distribution with parameters a and b |
double |
gammaTruncRand(double alpha,
double beta,
double T)
Sample a random number of a left truncated Ga(alpha,beta) distribution using inversion sampling. |
org.omegahat.Simulation.RandomGenerators.PRNG |
getPRNG()
Straight accessor function |
double |
loggammaPDF(double x,
double alpha,
double beta)
My own distribution function on log scale to make sure I got things right. |
void |
setPRNG(org.omegahat.Simulation.RandomGenerators.PRNG prng_in)
|
double |
uniformRand()
Overwrite the uniformRand method so we use the better PRNG! |
Methods inherited from class org.omegahat.Probability.Distributions.DistributionFunctions |
bernoulliRand, betaCDF, betaPDF, betaQuantile, betaRand, binomialCDF, binomialPMF, binomialQuantile, binomialRand, cauchyCDF, cauchyPDF, cauchyQuantile, cauchyRand, chisqCDF, chisqPDF, chisqQuantile, chisqRand, dirichletPDF, dirichletRand, exponentialRand, exponentialRand, fCDF, fPDF, fQuantile, fRand, gammaCDF, gammaPDF, gammaQuantile, gammaRand, geometricCDF, geometricPMF, geometricQuantile, geometricRand, hypergeometricCDF, hypergeometricPMF, lngamma, logbeta, macheps, normalCDF, normalPDF, normalQuantile, normalRand, poissonCDF, poissonPMF, poissonQuantile, poissonRand, tCDF, tPDF, tQuantile, tRand, uniformSeeds |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Distributions(org.omegahat.Simulation.RandomGenerators.PRNG prng_in)
Method Detail |
public org.omegahat.Simulation.RandomGenerators.PRNG getPRNG()
public void setPRNG(org.omegahat.Simulation.RandomGenerators.PRNG prng_in)
public double uniformRand()
public double gammaRand(double alpha, double beta)
public double gammaPDF(double x, double alpha, double beta)
public double loggammaPDF(double x, double alpha, double beta)
public double gammaSurv(double x, double alpha, double beta)
x
- Time valuealpha
- Shape parameter of gamma distribution (aka. gamma)beta
- 1/Scale parameter of gamma distribution.public double gammaQuantile(double p, double alpha, double beta)
p
- The prob to compute quantile foralpha
- alpha parambeta
- beta param
public double gammaCDF(double q, double alpha, double beta)
alpha
- alpha paramter of Ga(alpha,beta) distrib.beta
- bets paramter of Ga(alpha,beta) distrib.
public double gammaTruncRand(double alpha, double beta, double T)
alpha
- alpha paramter of Ga(alpha,beta) distrib.beta
- bets paramter of Ga(alpha,beta) distrib.T
- point of (left) truncation
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |