Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 151 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Gamma:: (4 methods):
  gamma()
  distribution()
  inverse()
  ln()


Class: Gamma  - X-Ref

gamma($value)   X-Ref
GAMMA.

Return the gamma function value.

param: mixed $value Float value for which we want the probability
return: array|float|string The result, or a string containing an error

distribution($value, $a, $b, $cumulative)   X-Ref
GAMMADIST.

Returns the gamma distribution.

param: mixed $value Float Value at which you want to evaluate the distribution
param: mixed $a Parameter to the distribution as a float
param: mixed $b Parameter to the distribution as a float
param: mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)
return: array|float|string

inverse($probability, $alpha, $beta)   X-Ref
GAMMAINV.

Returns the inverse of the Gamma distribution.

param: mixed $probability Float probability at which you want to evaluate the distribution
param: mixed $alpha Parameter to the distribution as a float
param: mixed $beta Parameter to the distribution as a float
return: array|float|string

ln($value)   X-Ref
GAMMALN.

Returns the natural logarithm of the gamma function.

param: mixed $value Float Value at which you want to evaluate the distribution
return: array|float|string