More clippy fixes.

This commit is contained in:
2019-01-02 22:24:42 +01:00
parent 8271464fe6
commit 7ad47d330f
3 changed files with 36 additions and 33 deletions

View File

@@ -232,8 +232,8 @@ impl SumFactor {
&self,
variable_arena: &mut VariableArena,
variable: VariableId,
y: Vec<Gaussian>,
fy: Vec<Gaussian>,
y: &[Gaussian],
fy: &[Gaussian],
a: &[f64],
) {
let (sum_pi, sum_tau) =
@@ -263,7 +263,7 @@ impl SumFactor {
}
pub fn update_sum(&self, variable_arena: &mut VariableArena) {
let (y, fy) = self
let (y, fy): (Vec<_>, Vec<_>) = self
.terms
.iter()
.map(|term| {
@@ -273,7 +273,7 @@ impl SumFactor {
})
.unzip();
self.internal_update(variable_arena, self.sum, y, fy, &self.coeffs);
self.internal_update(variable_arena, self.sum, &y, &fy, &self.coeffs);
}
pub fn update_term(&self, variable_arena: &mut VariableArena, index: usize) {
@@ -293,7 +293,7 @@ impl SumFactor {
})
.collect::<Vec<_>>();
let (y, fy) = self
let (y, fy): (Vec<_>, Vec<_>) = self
.terms
.iter()
.enumerate()
@@ -305,7 +305,7 @@ impl SumFactor {
})
.unzip();
self.internal_update(variable_arena, idx_term, y, fy, &a);
self.internal_update(variable_arena, idx_term, &y, &fy, &a);
}
pub fn update_all_terms(&self, variable_arena: &mut VariableArena) {