Files
trueskill/src/FactorGraphs/ScheduleStep.php

26 lines
505 B
PHP
Raw Normal View History

2022-07-05 15:55:47 +02:00
<?php
namespace DNW\Skills\FactorGraphs;
class ScheduleStep extends Schedule
{
private $_factor;
2022-07-05 15:55:47 +02:00
private $_index;
public function __construct($name, Factor $factor, $index)
{
parent::__construct($name);
$this->_factor = $factor;
$this->_index = $index;
}
public function visit($depth = -1, $maxDepth = 0)
{
$currentFactor = $this->_factor;
$delta = $currentFactor->updateMessageIndex($this->_index);
2022-07-05 15:55:47 +02:00
return $delta;
}
2022-07-05 15:55:47 +02:00
}