Files
trueskill/src/FactorGraphs/FactorGraphLayer.php

68 lines
1.4 KiB
PHP
Raw Normal View History

2022-07-05 15:33:34 +02:00
<?php namespace DNW\Skills\FactorGraphs;
// edit this
abstract class FactorGraphLayer
{
private $_localFactors = array();
2022-07-05 15:33:34 +02:00
private $_outputVariablesGroups = array();
private $_inputVariablesGroups = array();
private $_parentFactorGraph;
protected function __construct(FactorGraph $parentGraph)
{
$this->_parentFactorGraph = $parentGraph;
}
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;
}
2010-09-30 08:25:31 -04:00
protected function scheduleSequence(array $itemsToSequence, $name)
{
return new ScheduleSequence($name, $itemsToSequence);
}
protected function addLayerFactor(Factor $factor)
{
$this->_localFactors[] = $factor;
}
public abstract function buildLayer();
public function createPriorSchedule()
{
return null;
}
public function createPosteriorSchedule()
{
return null;
}
}