From 11fafc129a851918068227839bd2b364de99b01e Mon Sep 17 00:00:00 2001 From: Jens True Date: Tue, 19 Mar 2024 14:10:11 +0000 Subject: [PATCH] Slowly getting rid of stringable. --- src/Numerics/GaussianDistribution.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Numerics/GaussianDistribution.php b/src/Numerics/GaussianDistribution.php index 34236a9..2948a10 100644 --- a/src/Numerics/GaussianDistribution.php +++ b/src/Numerics/GaussianDistribution.php @@ -10,7 +10,7 @@ namespace DNW\Skills\Numerics; * @author Jeff Moser * @copyright 2010 Jeff Moser */ -class GaussianDistribution implements \Stringable +class GaussianDistribution { private const DEFAULT_STANDARD_DEVIATION = 1.0; private const DEFAULT_MEAN = 0.0; @@ -33,7 +33,7 @@ class GaussianDistribution implements \Stringable private const M_LOG_SQRT_2_PI = 0.9189385332046727417803297364056176398613974736377834128171515404; // precision and precisionMean are used because they make multiplying and dividing simpler - // (the the accompanying math paper for more details) + // (see the accompanying math paper for more details) private float $precision = 1.0; private float $precisionMean = 0.0; @@ -277,9 +277,4 @@ class GaussianDistribution implements \Stringable // From numerical recipes, page 320 return $mean - M_SQRT2 * $standardDeviation * GaussianDistribution::inverseErrorFunctionCumulativeTo(2 * $x); } - - public function __toString(): string - { - return sprintf('mean=%.4f standardDeviation=%.4f', $this->mean, $this->standardDeviation); - } }