mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	Tenative pass at getting prior layer working. Found out about division by zero and closure differences.
This commit is contained in:
		@@ -23,11 +23,11 @@ class GaussianPriorFactor extends GaussianFactor
 | 
			
		||||
    {
 | 
			
		||||
        parent::__construct("Prior value going to {0}");
 | 
			
		||||
        $this->_newMessage = new GaussianDistribution($mean, sqrt($variance));
 | 
			
		||||
        $this->createVariableToMessageBinding($variable,
 | 
			
		||||
                                               new Message(
 | 
			
		||||
                                                   GaussianDistribution::fromPrecisionMean(0, 0),
 | 
			
		||||
        $newMessage = new Message(GaussianDistribution::fromPrecisionMean(0, 0),
 | 
			
		||||
                                                       "message from {0} to {1}",
 | 
			
		||||
                                                   $this, variable));
 | 
			
		||||
                                                   $this, $variable);
 | 
			
		||||
 | 
			
		||||
        $this->createVariableToMessageBindingWithMessage($variable, $newMessage);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected function updateMessageVariable(Message &$message, Variable &$variable)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user