Some reference updates and adding the needed array(...) scope to existing data for single team values

This commit is contained in:
Jeff Moser
2010-09-25 22:40:56 -04:00
parent 8e9e2d0d86
commit 04c911742d
8 changed files with 51 additions and 47 deletions

View File

@ -22,8 +22,8 @@ abstract class GaussianFactor extends Factor
/// Sends the factor-graph message with and returns the log-normalization constant
protected function sendMessageVariable(Message &$message, Variable &$variable)
{
$marginal = $variable->getValue();
$messageValue = $message->getValue();
$marginal = &$variable->getValue();
$messageValue = &$message->getValue();
$logZ = GaussianDistribution::logProductNormalization($marginal, $messageValue);
$variable->setValue($marginal*$messageValue);
return $logZ;