From e90b28709683ed32f0ff1395a4339b8836426da7 Mon Sep 17 00:00:00 2001 From: Jens True Date: Thu, 3 Aug 2023 13:50:58 +0000 Subject: [PATCH] Two less warnings. --- src/FactorGraphs/FactorGraphLayer.php | 5 +++-- src/TrueSkill/Layers/PlayerPriorValuesToSkillsLayer.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/FactorGraphs/FactorGraphLayer.php b/src/FactorGraphs/FactorGraphLayer.php index baba1d0..52639a5 100644 --- a/src/FactorGraphs/FactorGraphLayer.php +++ b/src/FactorGraphs/FactorGraphLayer.php @@ -2,6 +2,7 @@ namespace DNW\Skills\FactorGraphs; use DNW\Skills\FactorGraphs\ScheduleSequence; +use DNW\Skills\TrueSkill\TrueSkillFactorGraph; abstract class FactorGraphLayer { @@ -19,7 +20,7 @@ abstract class FactorGraphLayer */ private $inputVariablesGroups = []; - protected function __construct(private readonly FactorGraph $parentFactorGraph) + protected function __construct(private readonly TrueSkillFactorGraph $parentFactorGraph) { } @@ -33,7 +34,7 @@ abstract class FactorGraphLayer // HACK - public function getParentFactorGraph(): FactorGraph + public function getParentFactorGraph(): TrueSkillFactorGraph { return $this->parentFactorGraph; } diff --git a/src/TrueSkill/Layers/PlayerPriorValuesToSkillsLayer.php b/src/TrueSkill/Layers/PlayerPriorValuesToSkillsLayer.php index 55fa357..6b9f893 100644 --- a/src/TrueSkill/Layers/PlayerPriorValuesToSkillsLayer.php +++ b/src/TrueSkill/Layers/PlayerPriorValuesToSkillsLayer.php @@ -61,6 +61,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer private function createPriorFactor(Rating $priorRating, Variable $skillsVariable): GaussianPriorFactor { + echo (get_class($this->getParentFactorGraph()).PHP_EOL); return new GaussianPriorFactor( $priorRating->getMean(), BasicMath::square($priorRating->getStandardDeviation()) +