mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 12:24:28 +00:00
72 lines
1.3 KiB
PHP
72 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace DNW\Skills\FactorGraphs;
|
|
|
|
// edit this
|
|
abstract class FactorGraphLayer
|
|
{
|
|
private array $_localFactors = [];
|
|
|
|
private array $_outputVariablesGroups = [];
|
|
|
|
private $_inputVariablesGroups = [];
|
|
|
|
protected function __construct(private readonly FactorGraph $_parentFactorGraph)
|
|
{
|
|
}
|
|
|
|
protected function getInputVariablesGroups()
|
|
{
|
|
return $this->_inputVariablesGroups;
|
|
}
|
|
|
|
// HACK
|
|
|
|
public function getParentFactorGraph()
|
|
{
|
|
return $this->_parentFactorGraph;
|
|
}
|
|
|
|
/**
|
|
* This reference is still needed
|
|
*
|
|
* @return array
|
|
*/
|
|
public function &getOutputVariablesGroups()
|
|
{
|
|
return $this->_outputVariablesGroups;
|
|
}
|
|
|
|
public function getLocalFactors()
|
|
{
|
|
return $this->_localFactors;
|
|
}
|
|
|
|
public function setInputVariablesGroups($value)
|
|
{
|
|
$this->_inputVariablesGroups = $value;
|
|
}
|
|
|
|
protected function scheduleSequence(array $itemsToSequence, $name)
|
|
{
|
|
return new ScheduleSequence($name, $itemsToSequence);
|
|
}
|
|
|
|
protected function addLayerFactor(Factor $factor)
|
|
{
|
|
$this->_localFactors[] = $factor;
|
|
}
|
|
|
|
abstract public function buildLayer();
|
|
|
|
public function createPriorSchedule()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public function createPosteriorSchedule()
|
|
{
|
|
return null;
|
|
}
|
|
}
|