mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-11 17:14:13 +00:00
General cleanup and removal of all unnecessary references
This commit is contained in:
@ -10,22 +10,22 @@ class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
|
||||
private $_epsilon;
|
||||
private $_teamRanks;
|
||||
|
||||
public function __construct(TrueSkillFactorGraph &$parentGraph, array &$teamRanks)
|
||||
public function __construct(TrueSkillFactorGraph $parentGraph, array $teamRanks)
|
||||
{
|
||||
parent::__construct($parentGraph);
|
||||
$this->_teamRanks = $teamRanks;
|
||||
$gameInfo = &$this->getParentFactorGraph()->getGameInfo();
|
||||
$gameInfo = $this->getParentFactorGraph()->getGameInfo();
|
||||
$this->_epsilon = DrawMargin::getDrawMarginFromDrawProbability($gameInfo->getDrawProbability(), $gameInfo->getBeta());
|
||||
}
|
||||
|
||||
public function buildLayer()
|
||||
{
|
||||
$inputVarGroups = &$this->getInputVariablesGroups();
|
||||
$inputVarGroups = $this->getInputVariablesGroups();
|
||||
$inputVarGroupsCount = count($inputVarGroups);
|
||||
|
||||
for ($i = 0; $i < $inputVarGroupsCount; $i++) {
|
||||
$isDraw = ($this->_teamRanks[$i] == $this->_teamRanks[$i + 1]);
|
||||
$teamDifference = &$inputVarGroups[$i][0];
|
||||
$teamDifference = $inputVarGroups[$i][0];
|
||||
|
||||
$factor =
|
||||
$isDraw
|
||||
|
Reference in New Issue
Block a user