Model::probabilities doesn't have to take self as mutable
This commit is contained in:
@@ -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));
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user