Pint applied

This commit is contained in:
Alex Wulf
2022-07-05 16:32:18 +02:00
parent 8b2d547ace
commit 5dd4acf57d
15 changed files with 95 additions and 99 deletions

View File

@ -72,12 +72,12 @@ class TwoTeamTrueSkillCalculator extends SkillCalculator
$totalPlayers = $selfTeam->count() + $otherTeam->count();
$meanGetter = fn($currentRating) => $currentRating->getMean();
$meanGetter = fn ($currentRating) => $currentRating->getMean();
$selfMeanSum = BasicMath::sum($selfTeam->getAllRatings(), $meanGetter);
$otherTeamMeanSum = BasicMath::sum($otherTeam->getAllRatings(), $meanGetter);
$varianceGetter = fn($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
$varianceGetter = fn ($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
$c = sqrt(
BasicMath::sum($selfTeam->getAllRatings(), $varianceGetter)
@ -153,9 +153,9 @@ class TwoTeamTrueSkillCalculator extends SkillCalculator
$betaSquared = BasicMath::square($gameInfo->getBeta());
$meanGetter = fn($currentRating) => $currentRating->getMean();
$meanGetter = fn ($currentRating) => $currentRating->getMean();
$varianceGetter = fn($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
$varianceGetter = fn ($currentRating) => BasicMath::square($currentRating->getStandardDeviation());
$team1MeanSum = BasicMath::sum($team1Ratings, $meanGetter);
$team1StdDevSquared = BasicMath::sum($team1Ratings, $varianceGetter);