Trait skillratings::Rating

source ·
pub trait Rating {
    // Required methods
    fn rating(&self) -> f64;
    fn uncertainty(&self) -> Option<f64>;
    fn new(rating: Option<f64>, uncertainty: Option<f64>) -> Self;
}
Expand description

Measure of player’s skill.

📌 Important note: Please keep in mind that some rating systems use widely different scales for measuring ratings.
Please check out the documentation for each rating system for more information, or use None to always use default values.

Some rating systems might consider other values too (volatility, age, matches played etc.). If that is the case, we will use the default values for those.

Required Methods§

source

fn rating(&self) -> f64

A single value for player’s skill

source

fn uncertainty(&self) -> Option<f64>

A value for the uncertainty of a players rating. If the algorithm does not include an uncertainty value, this will return None.

source

fn new(rating: Option<f64>, uncertainty: Option<f64>) -> Self

Initialise a Rating with provided score and uncertainty, if None use default. If the algorithm does not include an uncertainty value it will get dismissed.

Object Safety§

This trait is not object safe.

Implementors§