Additional Psalm warnings resolving

This commit is contained in:
2023-08-08 07:00:51 +00:00
parent ec255543d9
commit aa836e859d
10 changed files with 21 additions and 20 deletions

View File

@ -17,11 +17,11 @@ class GaussianPriorFactor extends GaussianFactor
public function __construct(float $mean, float $variance, Variable $variable)
{
parent::__construct(sprintf('Prior value going to %s', $variable));
parent::__construct(sprintf('Prior value going to %s', (string)$variable));
$this->newMessage = new GaussianDistribution($mean, sqrt($variance));
$newMessage = new Message(
GaussianDistribution::fromPrecisionMean(0, 0),
sprintf('message from %s to %s', $this, $variable)
sprintf('message from %s to %s', (string)$this, (string)$variable)
);
$this->createVariableToMessageBindingWithMessage($variable, $newMessage);