mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-31 13:14:02 +00:00
Another pass at fixing up references
This commit is contained in:
@ -13,7 +13,8 @@ class FactorList
|
||||
|
||||
public function getLogNormalization()
|
||||
{
|
||||
foreach($this->_list as $currentFactor)
|
||||
$list = &$this->_list;
|
||||
foreach($list as &$currentFactor)
|
||||
{
|
||||
$currentFactor->resetMarginals();
|
||||
}
|
||||
@ -36,7 +37,7 @@ class FactorList
|
||||
|
||||
$sumLogS = 0;
|
||||
|
||||
foreach($this->_list as $currentFactor)
|
||||
foreach($list as &$currentFactor)
|
||||
{
|
||||
$sumLogS = $sumLogS + $currentFactor->getLogNormalization();
|
||||
}
|
||||
@ -49,7 +50,7 @@ class FactorList
|
||||
return count($this->_list);
|
||||
}
|
||||
|
||||
public function addFactor(Factor &$factor)
|
||||
public function &addFactor(Factor &$factor)
|
||||
{
|
||||
$this->_list[] = $factor;
|
||||
return $factor;
|
||||
|
Reference in New Issue
Block a user