mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 12:24:28 +00:00
String based "name" for Variable class removed for performance
This commit is contained in:
@ -19,11 +19,11 @@ class GaussianPriorFactor extends GaussianFactor
|
||||
|
||||
public function __construct(float $mean, float $variance, Variable $variable)
|
||||
{
|
||||
parent::__construct(sprintf('Prior value going to %s', (string)$variable));
|
||||
parent::__construct('Prior value going to %s');
|
||||
$this->newMessage = new GaussianDistribution($mean, sqrt($variance));
|
||||
$newMessage = new Message(
|
||||
GaussianDistribution::fromPrecisionMean(0, 0),
|
||||
sprintf('message from %s to %s', (string)$this, (string)$variable)
|
||||
'message from %s to %s'
|
||||
);
|
||||
|
||||
$this->createVariableToMessageBindingWithMessage($variable, $newMessage);
|
||||
|
Reference in New Issue
Block a user