pub struct GradientDescent<S = NoSearch, Q = BarzilaiBorwein> {
pub abs_tol: Tolerances,
pub dual: bool,
pub error_norm: Norm,
pub line_search: S,
pub max_steps: usize,
pub rel_tol: Option<Scalar>,
pub step_estimator: Q,
}Expand description
The method of gradient descent.
Fields§
§abs_tol: TolerancesAbsolute error tolerances.
dual: boolLagrangian dual.
error_norm: NormNorm type for error evaluation.
line_search: SLine search algorithm.
max_steps: usizeMaximum number of steps.
rel_tol: Option<Scalar>Relative error tolerance.
step_estimator: QStep size estimator.
Implementations§
Source§impl<S, Q> GradientDescent<S, Q>
impl<S, Q> GradientDescent<S, Q>
Sourcepub fn with_line_search<T>(self, line_search: T) -> GradientDescent<T, Q>
pub fn with_line_search<T>(self, line_search: T) -> GradientDescent<T, Q>
The same solver, searching along each step with another line search.
Sourcepub fn with_step_estimator<T>(self, step_estimator: T) -> GradientDescent<S, T>
pub fn with_step_estimator<T>(self, step_estimator: T) -> GradientDescent<S, T>
The same solver, estimating each step size with another estimator.
Trait Implementations§
Source§impl<S, Q> Debug for GradientDescent<S, Q>where
S: ObjectiveMerit,
Q: StepEstimator,
impl<S, Q> Debug for GradientDescent<S, Q>where
S: ObjectiveMerit,
Q: StepEstimator,
Source§impl<S> Default for GradientDescent<S>where
S: Default,
impl<S> Default for GradientDescent<S>where
S: Default,
Source§impl<S, Q, F, J, X, E> Optimization<F, J, (), X> for GradientDescent<S, Q>where
S: ObjectiveMerit,
Q: StepEstimator,
F: Erase<Erased = Scalar> + Tensor,
<J as Tensor>::Unit: UnitMul<<X as Tensor>::Unit>,
<<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output: UnitSum,
<<<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output as UnitSum>::Output: Is<<F as Tensor>::Unit>,
J: Erase<Erased = E> + Jacobian + Mul<StepSize<J, X>, Output = X>,
for<'a> &'a J: Mul<StepSize<J, X>, Output = X>,
X: Erase<Erased = E> + Jacobian + Solution,
<X as Tensor>::Unit: UnitDiv<<J as Tensor>::Unit>,
E: Tensor,
for<'a> &'a Matrix: Mul<&'a X, Output = Vector>,
impl<S, Q, F, J, X, E> Optimization<F, J, (), X> for GradientDescent<S, Q>where
S: ObjectiveMerit,
Q: StepEstimator,
F: Erase<Erased = Scalar> + Tensor,
<J as Tensor>::Unit: UnitMul<<X as Tensor>::Unit>,
<<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output: UnitSum,
<<<J as Tensor>::Unit as UnitMul<<X as Tensor>::Unit>>::Output as UnitSum>::Output: Is<<F as Tensor>::Unit>,
J: Erase<Erased = E> + Jacobian + Mul<StepSize<J, X>, Output = X>,
for<'a> &'a J: Mul<StepSize<J, X>, Output = X>,
X: Erase<Erased = E> + Jacobian + Solution,
<X as Tensor>::Unit: UnitDiv<<J as Tensor>::Unit>,
E: Tensor,
for<'a> &'a Matrix: Mul<&'a X, Output = Vector>,
Source§impl<Q, F, X, E> RootFinding<F, (), X> for GradientDescent<NoSearch, Q>
impl<Q, F, X, E> RootFinding<F, (), X> for GradientDescent<NoSearch, Q>
Auto Trait Implementations§
impl<S, Q> Freeze for GradientDescent<S, Q>
impl<S, Q> RefUnwindSafe for GradientDescent<S, Q>where
S: RefUnwindSafe,
Q: RefUnwindSafe,
impl<S, Q> Send for GradientDescent<S, Q>
impl<S, Q> Sync for GradientDescent<S, Q>
impl<S, Q> Unpin for GradientDescent<S, Q>
impl<S, Q> UnsafeUnpin for GradientDescent<S, Q>where
S: UnsafeUnpin,
Q: UnsafeUnpin,
impl<S, Q> UnwindSafe for GradientDescent<S, Q>where
S: UnwindSafe,
Q: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more