mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-18 20:04:28 +00:00
More type work
This commit is contained in:
@ -5,6 +5,7 @@ namespace DNW\Skills\TrueSkill\Layers;
|
||||
use DNW\Skills\FactorGraphs\ScheduleStep;
|
||||
use DNW\Skills\FactorGraphs\ScheduleSequence;
|
||||
use DNW\Skills\PartialPlay;
|
||||
use DNW\Skills\Player;
|
||||
use DNW\Skills\TrueSkill\Factors\GaussianWeightedSumFactor;
|
||||
use DNW\Skills\FactorGraphs\Variable;
|
||||
|
||||
@ -39,6 +40,9 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Team[] $teamMembers
|
||||
*/
|
||||
protected function createPlayerToTeamSumFactor(array $teamMembers, Variable $sumVariable): GaussianWeightedSumFactor
|
||||
{
|
||||
$weights = array_map(
|
||||
|
@ -7,6 +7,7 @@ use DNW\Skills\FactorGraphs\Variable;
|
||||
use DNW\Skills\FactorGraphs\KeyedVariable;
|
||||
use DNW\Skills\Numerics\BasicMath;
|
||||
use DNW\Skills\Rating;
|
||||
use DNW\Skills\Team;
|
||||
use DNW\Skills\TrueSkill\Factors\GaussianPriorFactor;
|
||||
use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
|
||||
use DNW\Skills\FactorGraphs\ScheduleSequence;
|
||||
@ -15,6 +16,9 @@ use DNW\Skills\FactorGraphs\ScheduleSequence;
|
||||
// start the process.
|
||||
class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
|
||||
{
|
||||
/**
|
||||
* @param Team[] $teams
|
||||
*/
|
||||
public function __construct(TrueSkillFactorGraph $parentGraph, private readonly array $teams)
|
||||
{
|
||||
parent::__construct($parentGraph);
|
||||
|
@ -11,6 +11,9 @@ class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
|
||||
{
|
||||
private float $epsilon;
|
||||
|
||||
/**
|
||||
* @param int[] $teamRanks
|
||||
*/
|
||||
public function __construct(TrueSkillFactorGraph $parentGraph, private readonly array $teamRanks)
|
||||
{
|
||||
parent::__construct($parentGraph);
|
||||
|
Reference in New Issue
Block a user