mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-15 17:37:39 +00:00
Two less warnings.
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace DNW\Skills\FactorGraphs;
|
namespace DNW\Skills\FactorGraphs;
|
||||||
use DNW\Skills\FactorGraphs\ScheduleSequence;
|
use DNW\Skills\FactorGraphs\ScheduleSequence;
|
||||||
|
use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
|
||||||
|
|
||||||
abstract class FactorGraphLayer
|
abstract class FactorGraphLayer
|
||||||
{
|
{
|
||||||
@ -19,7 +20,7 @@ abstract class FactorGraphLayer
|
|||||||
*/
|
*/
|
||||||
private $inputVariablesGroups = [];
|
private $inputVariablesGroups = [];
|
||||||
|
|
||||||
protected function __construct(private readonly FactorGraph $parentFactorGraph)
|
protected function __construct(private readonly TrueSkillFactorGraph $parentFactorGraph)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ abstract class FactorGraphLayer
|
|||||||
|
|
||||||
// HACK
|
// HACK
|
||||||
|
|
||||||
public function getParentFactorGraph(): FactorGraph
|
public function getParentFactorGraph(): TrueSkillFactorGraph
|
||||||
{
|
{
|
||||||
return $this->parentFactorGraph;
|
return $this->parentFactorGraph;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
|
|||||||
|
|
||||||
private function createPriorFactor(Rating $priorRating, Variable $skillsVariable): GaussianPriorFactor
|
private function createPriorFactor(Rating $priorRating, Variable $skillsVariable): GaussianPriorFactor
|
||||||
{
|
{
|
||||||
|
echo (get_class($this->getParentFactorGraph()).PHP_EOL);
|
||||||
return new GaussianPriorFactor(
|
return new GaussianPriorFactor(
|
||||||
$priorRating->getMean(),
|
$priorRating->getMean(),
|
||||||
BasicMath::square($priorRating->getStandardDeviation()) +
|
BasicMath::square($priorRating->getStandardDeviation()) +
|
||||||
|
Reference in New Issue
Block a user