More stringable removal for performance.

This commit is contained in:
2024-03-19 15:48:29 +00:00
parent ae5d2a8b73
commit bbff1fbbbc
11 changed files with 34 additions and 61 deletions

View File

@@ -6,15 +6,12 @@ namespace DNW\Skills\FactorGraphs;
class ScheduleStep extends Schedule
{
public function __construct(string $name, private readonly Factor $factor, private readonly int $index)
public function __construct(private readonly Factor $factor, private readonly int $index)
{
parent::__construct($name);
}
public function visit(int $depth = -1, int $maxDepth = 0): float
{
$currentFactor = $this->factor;
return $currentFactor->updateMessageIndex($this->index);
return $this->factor->updateMessageIndex($this->index);
}
}