mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	Cleaned up some of the run schedule parts
This commit is contained in:
		@@ -25,7 +25,7 @@ abstract class GaussianFactor extends Factor
 | 
			
		||||
        $marginal = &$variable->getValue();
 | 
			
		||||
        $messageValue = &$message->getValue();
 | 
			
		||||
        $logZ = GaussianDistribution::logProductNormalization($marginal, $messageValue);
 | 
			
		||||
        $variable->setValue($marginal*$messageValue);
 | 
			
		||||
        $variable->setValue(GaussianDistribution::multiply($marginal, $messageValue));
 | 
			
		||||
        return $logZ;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -66,8 +66,8 @@ class GaussianLikelihoodFactor extends GaussianFactor
 | 
			
		||||
 | 
			
		||||
    public function updateMessageIndex($messageIndex)
 | 
			
		||||
    {
 | 
			
		||||
        $messages = $this->getMessages();
 | 
			
		||||
        $vars = $this->getVariables();
 | 
			
		||||
        $messages = &$this->getMessages();
 | 
			
		||||
        $vars = &$this->getVariables();
 | 
			
		||||
 | 
			
		||||
        switch ($messageIndex)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ class TrueSkillFactorGraph extends FactorGraph
 | 
			
		||||
 | 
			
		||||
        foreach ($this->_layers as $currentLayer)
 | 
			
		||||
        {
 | 
			
		||||
            foreach ($currentLayer->getFactors() as $currentFactor)
 | 
			
		||||
            foreach ($currentLayer->getLocalFactors() as $currentFactor)
 | 
			
		||||
            {
 | 
			
		||||
                $factorList->addFactor($currentFactor);
 | 
			
		||||
            }
 | 
			
		||||
@@ -107,10 +107,10 @@ class TrueSkillFactorGraph extends FactorGraph
 | 
			
		||||
 | 
			
		||||
        foreach ($this->_layers as $currentLayer)
 | 
			
		||||
        {
 | 
			
		||||
            $currentPriorSchedule = &$currentLayer->createPriorSchedule();
 | 
			
		||||
            $currentPriorSchedule = $currentLayer->createPriorSchedule();
 | 
			
		||||
            if ($currentPriorSchedule != null)
 | 
			
		||||
            {
 | 
			
		||||
                $fullSchedule[] = &$currentPriorSchedule;
 | 
			
		||||
                $fullSchedule[] = $currentPriorSchedule;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user