Two less warnings.

This commit is contained in:
Jens True 2023-08-03 13:50:58 +00:00
parent 0814be726a
commit e90b287096
2 changed files with 4 additions and 2 deletions

@ -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;
}

@ -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()) +