1
0
mirror of https://github.com/furyfire/trueskill.git synced 2025-03-23 09:57:41 +00:00

First pass at building the graph, but still off from running it

This commit is contained in:
Jeff Moser
2010-09-25 22:16:47 -04:00
parent eee44c9746
commit 8e9e2d0d86
5 changed files with 18 additions and 12 deletions

@ -27,12 +27,13 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
{
foreach ($this->getInputVariablesGroups() as $currentTeam)
{
$teamPerformance = $this->createOutputVariable($currentTeam);
$this->addLayerFactor($this->createPlayerToTeamSumFactor($currentTeam, $teamPerformance));
$teamPerformance = &$this->createOutputVariable($currentTeam);
$newSumFactor = $this->createPlayerToTeamSumFactor($currentTeam, $teamPerformance);
$this->addLayerFactor($newSumFactor);
// REVIEW: Does it make sense to have groups of one?
$outputVariablesGroups = $this->getOutputVariablesGroups();
$outputVariablesGroups = $teamPerformance;
$outputVariablesGroups = &$this->getOutputVariablesGroups();
$outputVariablesGroups[] = array($teamPerformance);
}
}