mirror of
https://github.com/furyfire/trueskill.git
synced 2025-05-06 03:47:46 +00:00
More standards
This commit is contained in:
@ -42,8 +42,10 @@ final class BasicBench
|
|||||||
$team1 = new Team($p1, $newRatings->getRating($p1));
|
$team1 = new Team($p1, $newRatings->getRating($p1));
|
||||||
$team2 = new Team($p2, $newRatings->getRating($p2));
|
$team2 = new Team($p2, $newRatings->getRating($p2));
|
||||||
|
|
||||||
|
ob_start();
|
||||||
echo $newRatings->getRating($p1)->getConservativeRating();
|
echo $newRatings->getRating($p1)->getConservativeRating();
|
||||||
echo $newRatings->getRating($p2)->getConservativeRating();
|
echo $newRatings->getRating($p2)->getConservativeRating();
|
||||||
|
ob_clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,8 +75,10 @@ final class BasicBench
|
|||||||
$team1 = new Team($p1, $newRatings->getRating($p1));
|
$team1 = new Team($p1, $newRatings->getRating($p1));
|
||||||
$team2 = new Team($p2, $newRatings->getRating($p2));
|
$team2 = new Team($p2, $newRatings->getRating($p2));
|
||||||
|
|
||||||
|
ob_start();
|
||||||
echo $newRatings->getRating($p1)->getConservativeRating();
|
echo $newRatings->getRating($p1)->getConservativeRating();
|
||||||
echo $newRatings->getRating($p2)->getConservativeRating();
|
echo $newRatings->getRating($p2)->getConservativeRating();
|
||||||
|
ob_clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,8 +108,10 @@ final class BasicBench
|
|||||||
$team1 = new Team($p1, $newRatings->getRating($p1));
|
$team1 = new Team($p1, $newRatings->getRating($p1));
|
||||||
$team2 = new Team($p2, $newRatings->getRating($p2));
|
$team2 = new Team($p2, $newRatings->getRating($p2));
|
||||||
|
|
||||||
|
ob_start();
|
||||||
echo $newRatings->getRating($p1)->getConservativeRating();
|
echo $newRatings->getRating($p1)->getConservativeRating();
|
||||||
echo $newRatings->getRating($p2)->getConservativeRating();
|
echo $newRatings->getRating($p2)->getConservativeRating();
|
||||||
|
ob_clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,9 +144,11 @@ final class BasicBench
|
|||||||
$team2 = new Team($p2, $newRatings->getRating($p2));
|
$team2 = new Team($p2, $newRatings->getRating($p2));
|
||||||
$team3 = new Team($p3, $newRatings->getRating($p3));
|
$team3 = new Team($p3, $newRatings->getRating($p3));
|
||||||
|
|
||||||
|
ob_start();
|
||||||
echo $newRatings->getRating($p1)->getConservativeRating();
|
echo $newRatings->getRating($p1)->getConservativeRating();
|
||||||
echo $newRatings->getRating($p2)->getConservativeRating();
|
echo $newRatings->getRating($p2)->getConservativeRating();
|
||||||
echo $newRatings->getRating($p3)->getConservativeRating();
|
echo $newRatings->getRating($p3)->getConservativeRating();
|
||||||
|
ob_clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpmetrics/phpmetrics": "^3.0-dev",
|
"phpmetrics/phpmetrics": "^3.0-dev",
|
||||||
"phpunit/phpunit": "^11.2",
|
"phpunit/phpunit": "^11.2",
|
||||||
"psalm/plugin-phpunit": "^0.18.4",
|
|
||||||
"rector/rector": "^1.0",
|
"rector/rector": "^1.0",
|
||||||
"league/csv": "^9.0"
|
"league/csv": "^9.0"
|
||||||
},
|
},
|
||||||
|
3314
composer.lock
generated
3314
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,7 @@ final class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPriorSchedule(): ?ScheduleSequence
|
public function createPriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
switch (count($this->getInputVariablesGroups())) {
|
switch (count($this->getInputVariablesGroups())) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -34,7 +34,7 @@ final class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGra
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPriorSchedule(): ?ScheduleSequence
|
public function createPriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
$localFactors = $this->getLocalFactors();
|
$localFactors = $this->getLocalFactors();
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ final class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGra
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPosteriorSchedule(): ?ScheduleSequence
|
public function createPosteriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
$allFactors = [];
|
$allFactors = [];
|
||||||
$localFactors = $this->getLocalFactors();
|
$localFactors = $this->getLocalFactors();
|
||||||
|
@ -51,7 +51,7 @@ final class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPriorSchedule(): ?ScheduleSequence
|
public function createPriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
$localFactors = $this->getLocalFactors();
|
$localFactors = $this->getLocalFactors();
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ final class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPriorSchedule(): ?ScheduleSequence
|
public function createPriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
$localFactors = $this->getLocalFactors();
|
$localFactors = $this->getLocalFactors();
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ final class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
public function createPosteriorSchedule(): ?ScheduleSequence
|
public function createPosteriorSchedule(): ScheduleSequence
|
||||||
{
|
{
|
||||||
$localFactors = $this->getLocalFactors();
|
$localFactors = $this->getLocalFactors();
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ final class TwoTeamTrueSkillCalculator extends SkillCalculator
|
|||||||
$team2Ratings = $teams[1]->getAllRatings();
|
$team2Ratings = $teams[1]->getAllRatings();
|
||||||
$team2Count = count($team2Ratings);
|
$team2Count = count($team2Ratings);
|
||||||
|
|
||||||
$totalPlayers = $team1Count + $team2Count;
|
$totalPlayers = (float)($team1Count + $team2Count);
|
||||||
|
|
||||||
$betaSquared = BasicMath::square($gameInfo->getBeta());
|
$betaSquared = BasicMath::square($gameInfo->getBeta());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user