Update CauchyDistribution.php

This commit is contained in:
Dennis Eichhorn 2018-02-26 14:39:52 +01:00 committed by GitHub
parent 2305380945
commit 49ecbc3259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,20 @@ class CauchyDistribution
{
return $x0;
}
/**
* Get entropy.
*
* @param float $gamma Gamma / scale parameter
*
* @return float
*
* @since 1.0.0
*/
public static function getEntropy(float $gamma) : float
{
return log(4 * M_PI * $gamma);
}
public static function getRandom()
{