diff --git a/optimal-linesearch/src/fixed_step_size.rs b/optimal-linesearch/src/fixed_step_size.rs index cff3662..3b9a3df 100644 --- a/optimal-linesearch/src/fixed_step_size.rs +++ b/optimal-linesearch/src/fixed_step_size.rs @@ -26,7 +26,7 @@ //! ``` use std::{ - ops::{Mul, RangeInclusive, SubAssign}, + ops::{AddAssign, Mul, RangeInclusive}, sync::Arc, }; @@ -177,7 +177,7 @@ impl Config { impl StreamingIterator for FixedStepSize where - A: Clone + SubAssign + Mul, + A: Clone + AddAssign + Mul, D: StepDirection>>, { type Item = Self; @@ -195,7 +195,7 @@ where point .iter_mut() .zip(step_direction.step_direction) - .for_each(|(x, d)| *x -= self.config.step_size.clone() * d); + .for_each(|(x, d)| *x += self.config.step_size.clone() * d); State::Stepped { point } } None => State::GettingStepDirection { point },