More type work.

This commit is contained in:
2023-08-02 10:10:57 +00:00
parent a60187a3fd
commit 5c7471963c
14 changed files with 43 additions and 38 deletions

View File

@ -9,6 +9,7 @@ use DNW\Skills\Numerics\BasicMath;
use DNW\Skills\Rating;
use DNW\Skills\TrueSkill\Factors\GaussianPriorFactor;
use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
use DNW\Skills\FactorGraphs\ScheduleSequence;
// We intentionally have no Posterior schedule since the only purpose here is to
// start the process.
@ -19,7 +20,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
parent::__construct($parentGraph);
}
public function buildLayer()
public function buildLayer(): void
{
$teams = $this->teams;
foreach ($teams as $currentTeam) {
@ -41,7 +42,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
}
}
public function createPriorSchedule()
public function createPriorSchedule(): ScheduleSequence
{
$localFactors = $this->getLocalFactors();
@ -54,7 +55,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
);
}
private function createPriorFactor(Rating $priorRating, Variable $skillsVariable)
private function createPriorFactor(Rating $priorRating, Variable $skillsVariable): GaussianPriorFactor
{
return new GaussianPriorFactor(
$priorRating->getMean(),