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

@ -7,7 +7,7 @@ use DNW\Skills\TrueSkill\Factors\GaussianWeightedSumFactor;
class TeamPerformancesToTeamPerformanceDifferencesLayer extends TrueSkillFactorGraphLayer
{
public function buildLayer()
public function buildLayer(): void
{
$inputVariablesGroups = $this->getInputVariablesGroups();
$inputVariablesGroupsCount = is_countable($inputVariablesGroups) ? count($inputVariablesGroups) : 0;
@ -30,14 +30,14 @@ class TeamPerformancesToTeamPerformanceDifferencesLayer extends TrueSkillFactorG
Variable $strongerTeam,
Variable $weakerTeam,
Variable $output
) {
): GaussianWeightedSumFactor {
$teams = [$strongerTeam, $weakerTeam];
$weights = [1.0, -1.0];
return new GaussianWeightedSumFactor($output, $teams, $weights);
}
private function createOutputVariable()
private function createOutputVariable(): Variable
{
return $this->getParentFactorGraph()->getVariableFactory()->createBasicVariable('Team performance difference');
}