Another pass at fixing up references

This commit is contained in:
Jeff Moser
2010-09-30 08:25:31 -04:00
parent 5368f7528e
commit 803a0816a8
28 changed files with 168 additions and 103 deletions

View File

@ -39,14 +39,17 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
public function createPriorSchedule()
{
return $this->scheduleSequence(
array_map(
function($weightedSumFactor)
{
return new ScheduleStep("Perf to Team Perf Step", $weightedSumFactor, 0);
},
$this->getLocalFactors()),
"all player perf to team perf schedule");
$localFactors = &$this->getLocalFactors();
$sequence = &$this->scheduleSequence(
array_map(
function($weightedSumFactor)
{
return new ScheduleStep("Perf to Team Perf Step", $weightedSumFactor, 0);
},
$localFactors),
"all player perf to team perf schedule");
return $sequence;
}
protected function createPlayerToTeamSumFactor(&$teamMembers, &$sumVariable)
@ -69,7 +72,8 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
{
// BLOG
$allFactors = array();
foreach($this->getLocalFactors() as $currentFactor)
$localFactors = &$this->getLocalFactors();
foreach($localFactors as &$currentFactor)
{
$numberOfMessages = $currentFactor->getNumberOfMessages();
for($currentIteration = 1; $currentIteration < $numberOfMessages; $currentIteration++)