mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	Two less warnings.
This commit is contained in:
		@@ -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()) +
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user