2022-07-05 15:33:34 +02:00
|
|
|
<?php namespace DNW\Skills\FactorGraphs;
|
2016-05-24 14:10:39 +02:00
|
|
|
|
|
|
|
class ScheduleStep extends Schedule
|
|
|
|
{
|
|
|
|
private $_factor;
|
|
|
|
private $_index;
|
|
|
|
|
2016-05-24 16:31:21 +02:00
|
|
|
public function __construct($name, Factor $factor, $index)
|
2016-05-24 14:10:39 +02:00
|
|
|
{
|
|
|
|
parent::__construct($name);
|
|
|
|
$this->_factor = $factor;
|
|
|
|
$this->_index = $index;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function visit($depth = -1, $maxDepth = 0)
|
|
|
|
{
|
2016-05-24 16:31:21 +02:00
|
|
|
$currentFactor = $this->_factor;
|
2016-05-24 14:10:39 +02:00
|
|
|
$delta = $currentFactor->updateMessageIndex($this->_index);
|
|
|
|
return $delta;
|
|
|
|
}
|
|
|
|
}
|