mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-16 11:04:27 +00:00
More type work.
This commit is contained in:
@ -14,16 +14,16 @@ use DNW\Skills\TrueSkill\TruncatedGaussianCorrectionFunctions;
|
||||
*/
|
||||
class GaussianGreaterThanFactor extends GaussianFactor
|
||||
{
|
||||
private $epsilon;
|
||||
private float $epsilon;
|
||||
|
||||
public function __construct($epsilon, Variable $variable)
|
||||
public function __construct(float $epsilon, Variable $variable)
|
||||
{
|
||||
parent::__construct(\sprintf('%s > %.2f', $variable, $epsilon));
|
||||
$this->epsilon = $epsilon;
|
||||
$this->createVariableToMessageBinding($variable);
|
||||
}
|
||||
|
||||
public function getLogNormalization()
|
||||
public function getLogNormalization(): float
|
||||
{
|
||||
/**
|
||||
* @var Variable[] $vars
|
||||
@ -48,7 +48,7 @@ class GaussianGreaterThanFactor extends GaussianFactor
|
||||
);
|
||||
}
|
||||
|
||||
protected function updateMessageVariable(Message $message, Variable $variable)
|
||||
protected function updateMessageVariable(Message $message, Variable $variable): float
|
||||
{
|
||||
$oldMarginal = clone $variable->getValue();
|
||||
$oldMessage = clone $message->getValue();
|
||||
|
Reference in New Issue
Block a user