It gets a result... unfortunately it's wrong. But hey, that's progress :) Lots of debugging code left in to make up for a less than ideal debugger

This commit is contained in:
Jeff Moser
2010-10-02 21:15:47 -04:00
parent c22683ab33
commit fc6cd5c961
22 changed files with 145 additions and 70 deletions

View File

@ -119,8 +119,13 @@ class GaussianWeightedSumFactor extends GaussianFactor
foreach ($variablesToSum as &$currentVariable)
{
$this->createVariableToMessageBinding($currentVariable);
$localCurrentVariable = &$currentVariable;
$this->createVariableToMessageBinding($localCurrentVariable);
}
// DEBUG
$selfName = (string)$this;
$selfVars = &$this->getVariables();
}
public function getLogNormalization()
@ -201,6 +206,8 @@ class GaussianWeightedSumFactor extends GaussianFactor
public function updateMessageIndex($messageIndex)
{
// DEBUG
$currentFactorName = (string)$this;
$allMessages = &$this->getMessages();
$allVariables = &$this->getVariables();
@ -221,6 +228,12 @@ class GaussianWeightedSumFactor extends GaussianFactor
$updatedVariables[] = &$allVariables[$indicesToUse[$i]];
}
// DEBUG
foreach($allVariables as &$currentVariable)
{
$currentVarVal = &$currentVariable->getValue();
}
return $this->updateHelper($this->_weights[$messageIndex],
$this->_weightsSquared[$messageIndex],
$updatedMessages,