Trait skillratings::MultiTeamRatingSystem
source · pub trait MultiTeamRatingSystem {
type RATING: Rating + Copy + Debug;
type CONFIG;
// Required methods
fn new(config: Self::CONFIG) -> Self;
fn rate(
&self,
teams_and_ranks: &[(&[Self::RATING], MultiTeamOutcome)]
) -> Vec<Vec<Self::RATING>>;
fn expected_score(&self, teams: &[&[Self::RATING]]) -> Vec<f64>;
}
Expand description
Rating system for more than two teams.
📌 Important note: The MultiTeamRatingSystem Trait only implements the rate
and expected_score
functions.
Some rating systems might also implement additional functions which you can only access by using those directly.
Required Associated Types§
Required Methods§
sourcefn new(config: Self::CONFIG) -> Self
fn new(config: Self::CONFIG) -> Self
Initialise rating system with provided config. If the rating system does not require a config, leave empty brackets.
sourcefn rate(
&self,
teams_and_ranks: &[(&[Self::RATING], MultiTeamOutcome)]
) -> Vec<Vec<Self::RATING>>
fn rate( &self, teams_and_ranks: &[(&[Self::RATING], MultiTeamOutcome)] ) -> Vec<Vec<Self::RATING>>
Calculate ratings for multiple teams based on provided ratings and outcome.
sourcefn expected_score(&self, teams: &[&[Self::RATING]]) -> Vec<f64>
fn expected_score(&self, teams: &[&[Self::RATING]]) -> Vec<f64>
Calculate expected outcome of multiple teams. Returns probability of team winning from 0.0 to 1.0.
Object Safety§
This trait is not object safe.