mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 02:02:29 +01:00 
			
		
		
		
	Start of journey to actually give real names to factor graph variables using more PHP style
This commit is contained in:
		@@ -14,17 +14,17 @@ class VariableFactory
 | 
			
		||||
        $this->_variablePriorInitializer = &$variablePriorInitializer;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function createBasicVariable()
 | 
			
		||||
    public function createBasicVariable($name)
 | 
			
		||||
    {
 | 
			
		||||
        $initializer = $this->_variablePriorInitializer;
 | 
			
		||||
        $newVar = new Variable("variable", $initializer());
 | 
			
		||||
        $newVar = new Variable($name, $initializer());
 | 
			
		||||
        return $newVar;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function createKeyedVariable($key)
 | 
			
		||||
    public function createKeyedVariable($key, $name)
 | 
			
		||||
    {
 | 
			
		||||
        $initializer = $this->_variablePriorInitializer;
 | 
			
		||||
        $newVar = new KeyedVariable($key, "key variable", $initializer());
 | 
			
		||||
        $newVar = new KeyedVariable($key, $name, $initializer());
 | 
			
		||||
        return $newVar;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user