Trait skillratings::TeamRatingSystem
source · pub trait TeamRatingSystem {
type RATING: Rating + Copy + Debug;
type CONFIG;
// Required methods
fn new(config: Self::CONFIG) -> Self;
fn rate(
&self,
team_one: &[Self::RATING],
team_two: &[Self::RATING],
outcome: &Outcomes
) -> (Vec<Self::RATING>, Vec<Self::RATING>);
fn expected_score(
&self,
team_one: &[Self::RATING],
team_two: &[Self::RATING]
) -> (f64, f64);
}
Expand description
Rating system for two teams.
📌 Important note: The TeamRatingSystem 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.
Object Safety§
This trait is not object safe.