More debugging and realizing how PHP does references

This commit is contained in:
Jeff Moser
2010-09-25 15:46:23 -04:00
parent e8d444e7da
commit 086d94865f
21 changed files with 77 additions and 72 deletions

View File

@ -35,15 +35,16 @@ class TrueSkillFactorGraph extends FactorGraph
private $_priorLayer;
private $_variableFactory;
public function __construct(GameInfo $gameInfo, $teams, array $teamRanks)
public function __construct(GameInfo &$gameInfo, &$teams, array $teamRanks)
{
$this->_priorLayer = new PlayerPriorValuesToSkillsLayer($this, $teams);
$this->_gameInfo = $gameInfo;
$this->_variableFactory = new VariableFactory(
$newFactory = new VariableFactory(
function()
{
return GaussianDistribution::fromPrecisionMean(0, 0);
});
$this->setVariableFactory($newFactory);
$this->_layers = array(
$this->_priorLayer,