2022-07-05 15:55:47 +02:00
|
|
|
<?php
|
|
|
|
|
|
2024-02-02 14:53:38 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2022-07-05 15:55:47 +02:00
|
|
|
namespace DNW\Skills\FactorGraphs;
|
2016-05-24 14:10:39 +02:00
|
|
|
|
2025-04-15 08:14:08 +00:00
|
|
|
final class ScheduleStep extends Schedule
|
2016-05-24 14:10:39 +02:00
|
|
|
{
|
2024-03-19 15:48:29 +00:00
|
|
|
public function __construct(private readonly Factor $factor, private readonly int $index)
|
2016-05-24 14:10:39 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-28 09:20:03 +00:00
|
|
|
#[\Override]
|
2023-08-02 09:36:44 +00:00
|
|
|
public function visit(int $depth = -1, int $maxDepth = 0): float
|
2016-05-24 14:10:39 +02:00
|
|
|
{
|
2024-03-19 15:48:29 +00:00
|
|
|
return $this->factor->updateMessageIndex($this->index);
|
2016-05-24 14:10:39 +02:00
|
|
|
}
|
2022-07-05 15:55:47 +02:00
|
|
|
}
|