final class Gamma extends AnyRef

Gamma distribution; <A HREF="http://wwwinfo.cern.ch/asdoc/shortwrupsdir/g106/top.html"> math definition</A>, <A HREF="http://www.cern.ch/RD11/rkb/AN16pp/node96.html#SECTION000960000000000000000"> definition of gamma function</A> and <A HREF="http://www.statsoft.com/textbook/glosf.html#Gamma Distribution"> animated definition</A>.

p(x) = k * x^(alpha-1) * e^(-x/beta) with k = 1/(g(alpha) * b^a)) and g(a) being the gamma function.

Valid parameter ranges: alpha > 0.

Note: For a Gamma distribution to have the mean mean and variance variance, set the parameters as follows:

alpha = mean*mean / variance; lambda = 1 / (variance / mean);

Implementation: <dt> Method: Acceptance Rejection combined with Acceptance Complement. <dt> High performance implementation. This is a port of <A HREF="http://wwwinfo.cern.ch/asd/lhc++/clhep/manual/RefGuide/Random/RandGamma.html">RandGamma</A> used in <A HREF="http://wwwinfo.cern.ch/asd/lhc++/clhep">CLHEP 1.4.0</A> (C++). CLHEP's implementation, in turn, is based on gds.c from the <A HREF="http://www.cis.tu-graz.ac.at/stat/stadl/random.html">C-RAND / WIN-RAND</A> library. C-RAND's implementation, in turn, is based upon

J.H. Ahrens, U. Dieter (1974): Computer methods for sampling from gamma, beta, Poisson and binomial distributions, Computing 12, 223-246.

and

J.H. Ahrens, U. Dieter (1982): Generating gamma variates by a modified rejection technique, Communications of the ACM 25, 47-54.

Source
Gamma.java
Version

1.0, 09/24/99

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gamma
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All