Model::probabilities doesn't have to take self as mutable

This commit is contained in:
2022-06-07 11:41:35 +02:00
parent 174065bcf1
commit b01193779d
3 changed files with 3 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ impl Binary {
false false
} }
pub fn probabilities(&mut self, team_1: &[&str], team_2: &[&str], t: f64) -> (f64, f64) { pub fn probabilities(&self, team_1: &[&str], team_2: &[&str], t: f64) -> (f64, f64) {
let mut elems = self.process_items(team_1, 1.0); let mut elems = self.process_items(team_1, 1.0);
elems.extend(self.process_items(team_2, -1.0)); elems.extend(self.process_items(team_2, -1.0));

View File

@@ -83,7 +83,7 @@ impl DifferenceModel {
} }
pub fn probabilities( pub fn probabilities(
&mut self, &self,
_team_1: &[&str], _team_1: &[&str],
_team_2: &[&str], _team_2: &[&str],
_t: f64, _t: f64,

View File

@@ -165,7 +165,7 @@ impl TernaryModel {
} }
pub fn probabilities( pub fn probabilities(
&mut self, &self,
team_1: &[&str], team_1: &[&str],
team_2: &[&str], team_2: &[&str],
t: f64, t: f64,