mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-18 20:04:28 +00:00
More type work.
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
Reference in New Issue
Block a user