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
sourceimpl<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
sourceimpl<L: Clone, F: Clone> Clone for GaussNewtonLS<L, F>
impl<L: Clone, F: Clone> Clone for GaussNewtonLS<L, F>
sourcefn clone(&self) -> GaussNewtonLS<L, F>
fn clone(&self) -> GaussNewtonLS<L, F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'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>,
sourcefn 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
sourceimpl<L, F> Serialize for GaussNewtonLS<L, F> where
L: Serialize,
F: Serialize,
impl<L, F> Serialize for GaussNewtonLS<L, F> where
L: Serialize,
F: Serialize,
sourceimpl<O, L, F, P, G, J, U> Solver<O, IterState<P, G, J, (), F>> for GaussNewtonLS<L, F> where
O: Operator<Param = P, Output = U> + Jacobian<Param = P, Jacobian = J>,
P: Clone + SerializeAlias + DeserializeOwnedAlias + ArgminMul<F, P>,
G: Clone + SerializeAlias + DeserializeOwnedAlias,
U: ArgminNorm<F>,
J: Clone + SerializeAlias + DeserializeOwnedAlias + 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, (), (), F>>,
F: ArgminFloat,
impl<O, L, F, P, G, J, U> Solver<O, IterState<P, G, J, (), F>> for GaussNewtonLS<L, F> where
O: Operator<Param = P, Output = U> + Jacobian<Param = P, Jacobian = J>,
P: Clone + SerializeAlias + DeserializeOwnedAlias + ArgminMul<F, P>,
G: Clone + SerializeAlias + DeserializeOwnedAlias,
U: ArgminNorm<F>,
J: Clone + SerializeAlias + DeserializeOwnedAlias + 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, (), (), F>>,
F: ArgminFloat,
sourceconst 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.
sourcefn next_iter(
&mut self,
problem: &mut Problem<O>,
state: IterState<P, G, J, (), F>
) -> Result<(IterState<P, G, J, (), F>, Option<KV>), Error>
fn next_iter(
&mut self,
problem: &mut Problem<O>,
state: IterState<P, G, J, (), F>
) -> Result<(IterState<P, G, J, (), F>, Option<KV>), Error>
sourcefn terminate(&mut self, state: &IterState<P, G, J, (), F>) -> TerminationReason
fn terminate(&mut self, state: &IterState<P, G, J, (), F>) -> TerminationReason
Used to implement stopping criteria, in particular criteria which are not covered by
(terminate_internal
. Read more
sourcefn 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
sourcefn terminate_internal(&mut self, state: &I) -> TerminationReason
fn terminate_internal(&mut self, state: &I) -> TerminationReason
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> where
F: Send,
L: Send,
impl<L, F> Sync for GaussNewtonLS<L, F> where
F: Sync,
L: Sync,
impl<L, F> Unpin for GaussNewtonLS<L, F> where
F: Unpin,
L: Unpin,
impl<L, F> UnwindSafe for GaussNewtonLS<L, F> where
F: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more