Struct argmin::solver::gaussnewton::GaussNewtonLS
source · 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 copy 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§const NAME: &'static str = "Gauss-Newton method with line search"
const NAME: &'static str = "Gauss-Newton method with line search"
Name of the solver. Mainly used in Observers.
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> RefUnwindSafe for GaussNewtonLS<L, F>where
F: RefUnwindSafe,
L: 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
F: UnwindSafe,
L: 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