pub struct GaussNewtonLS<L, F> { /* private fields */ }Expand description
§Gauss-Newton method with line search
Gauss-Newton method where an appropriate step length is obtained by a line search.
Requires an initial parameter vector.
§Requirements on the optimization problem
The optimization problem is required to implement Operator and Jacobian.
§Reference
Jorge Nocedal and Stephen J. Wright (2006). Numerical Optimization. Springer. ISBN 0-387-30303-0.
Implementations§
Source§impl<L, F: ArgminFloat> GaussNewtonLS<L, F>
impl<L, F: ArgminFloat> GaussNewtonLS<L, F>
Sourcepub fn new(linesearch: L) -> Self
pub fn new(linesearch: L) -> Self
Construct a new instance of GaussNewtonLS.
§Example
let gauss_newton_ls: GaussNewtonLS<_, f64> = GaussNewtonLS::new(linesearch);Sourcepub fn with_tolerance(self, tol: F) -> Result<Self, Error>
pub fn with_tolerance(self, tol: F) -> Result<Self, Error>
Set tolerance for the stopping criterion based on cost difference.
Tolerance must be larger than zero and defaults to sqrt(EPSILON).
§Example
let gauss_newton_ls = GaussNewtonLS::new(linesearch).with_tolerance(1e-4f64)?;Trait Implementations§
Source§impl<L: Clone, F: Clone> Clone for GaussNewtonLS<L, F>
impl<L: Clone, F: Clone> Clone for GaussNewtonLS<L, F>
Source§fn clone(&self) -> GaussNewtonLS<L, F>
fn clone(&self) -> GaussNewtonLS<L, F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, L, F> Deserialize<'de> for GaussNewtonLS<L, F>where
L: Deserialize<'de>,
F: Deserialize<'de>,
impl<'de, L, F> Deserialize<'de> for GaussNewtonLS<L, F>where
L: Deserialize<'de>,
F: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<L, F> Serialize for GaussNewtonLS<L, F>
impl<L, F> Serialize for GaussNewtonLS<L, F>
Source§impl<O, L, F, P, G, J, U, R> Solver<O, IterState<P, G, J, (), R, F>> for GaussNewtonLS<L, F>where
O: Operator<Param = P, Output = U> + Jacobian<Param = P, Jacobian = J>,
P: Clone + ArgminMul<F, P>,
G: Clone,
U: ArgminL2Norm<F>,
J: Clone + ArgminTranspose<J> + ArgminInv<J> + ArgminDot<J, J> + ArgminDot<G, P> + ArgminDot<U, G>,
L: Clone + LineSearch<P, F> + Solver<LineSearchProblem<O, F>, IterState<P, G, (), (), R, F>>,
F: ArgminFloat,
R: Clone,
impl<O, L, F, P, G, J, U, R> Solver<O, IterState<P, G, J, (), R, F>> for GaussNewtonLS<L, F>where
O: Operator<Param = P, Output = U> + Jacobian<Param = P, Jacobian = J>,
P: Clone + ArgminMul<F, P>,
G: Clone,
U: ArgminL2Norm<F>,
J: Clone + ArgminTranspose<J> + ArgminInv<J> + ArgminDot<J, J> + ArgminDot<G, P> + ArgminDot<U, G>,
L: Clone + LineSearch<P, F> + Solver<LineSearchProblem<O, F>, IterState<P, G, (), (), R, F>>,
F: ArgminFloat,
R: Clone,
Source§fn next_iter(
&mut self,
problem: &mut Problem<O>,
state: IterState<P, G, J, (), R, F>,
) -> Result<(IterState<P, G, J, (), R, F>, Option<KV>), Error>
fn next_iter( &mut self, problem: &mut Problem<O>, state: IterState<P, G, J, (), R, F>, ) -> Result<(IterState<P, G, J, (), R, F>, Option<KV>), Error>
Computes a single iteration of the algorithm and has access to the optimization problem
definition and the internal state of the solver.
Returns an updated
state and optionally a KV which holds key-value pairs used in
Observers.Source§fn terminate(
&mut self,
state: &IterState<P, G, J, (), R, F>,
) -> TerminationStatus
fn terminate( &mut self, state: &IterState<P, G, J, (), R, F>, ) -> TerminationStatus
Used to implement stopping criteria, in particular criteria which are not covered by
(
terminate_internal. Read moreSource§fn init(
&mut self,
_problem: &mut Problem<O>,
state: I,
) -> Result<(I, Option<KV>), Error>
fn init( &mut self, _problem: &mut Problem<O>, state: I, ) -> Result<(I, Option<KV>), Error>
Initializes the algorithm. Read more
Source§fn terminate_internal(&mut self, state: &I) -> TerminationStatus
fn terminate_internal(&mut self, state: &I) -> TerminationStatus
Checks whether basic termination reasons apply. Read more
Auto Trait Implementations§
impl<L, F> Freeze for GaussNewtonLS<L, F>
impl<L, F> RefUnwindSafe for GaussNewtonLS<L, F>where
L: RefUnwindSafe,
F: RefUnwindSafe,
impl<L, F> Send for GaussNewtonLS<L, F>
impl<L, F> Sync for GaussNewtonLS<L, F>
impl<L, F> Unpin for GaussNewtonLS<L, F>
impl<L, F> UnwindSafe for GaussNewtonLS<L, F>where
L: UnwindSafe,
F: 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