pub struct NewtonCG<L, F> { /* private fields */ }
Expand description
The Newton-CG method (also called truncated Newton method) uses a modified CG to solve the Newton equations approximately. After a search direction is found, a line search is performed.
References:
[0] Jorge Nocedal and Stephen J. Wright (2006). Numerical Optimization. Springer. ISBN 0-387-30303-0.
Implementations
sourceimpl<L, F: ArgminFloat> NewtonCG<L, F>
impl<L, F: ArgminFloat> NewtonCG<L, F>
Trait Implementations
sourceimpl<'de, L, F> Deserialize<'de> for NewtonCG<L, F> where
L: Deserialize<'de>,
F: Deserialize<'de>,
impl<'de, L, F> Deserialize<'de> for NewtonCG<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<O, L, F> Solver<O> for NewtonCG<L, F> where
O: ArgminOp<Output = F, Float = F>,
O::Param: Send + Sync + Clone + Serialize + Default + ArgminSub<O::Param, O::Param> + ArgminAdd<O::Param, O::Param> + ArgminDot<O::Param, O::Float> + ArgminScaledAdd<O::Param, O::Float, O::Param> + ArgminMul<F, O::Param> + ArgminConj + ArgminZeroLike + ArgminNorm<O::Float>,
O::Hessian: Send + Sync + Default + Clone + Serialize + ArgminInv<O::Hessian> + ArgminDot<O::Param, O::Param>,
L: Clone + ArgminLineSearch<O::Param, O::Float> + Solver<O>,
F: ArgminFloat + Default + ArgminDiv<O::Float, O::Float> + ArgminNorm<O::Float> + ArgminConj,
impl<O, L, F> Solver<O> for NewtonCG<L, F> where
O: ArgminOp<Output = F, Float = F>,
O::Param: Send + Sync + Clone + Serialize + Default + ArgminSub<O::Param, O::Param> + ArgminAdd<O::Param, O::Param> + ArgminDot<O::Param, O::Float> + ArgminScaledAdd<O::Param, O::Float, O::Param> + ArgminMul<F, O::Param> + ArgminConj + ArgminZeroLike + ArgminNorm<O::Float>,
O::Hessian: Send + Sync + Default + Clone + Serialize + ArgminInv<O::Hessian> + ArgminDot<O::Param, O::Param>,
L: Clone + ArgminLineSearch<O::Param, O::Float> + Solver<O>,
F: ArgminFloat + Default + ArgminDiv<O::Float, O::Float> + ArgminNorm<O::Float> + ArgminConj,
sourcefn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
fn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
Computes one iteration of the algorithm.
sourcefn terminate(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated
sourcefn init(
&mut self,
_op: &mut OpWrapper<O>,
_state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
fn init(
&mut self,
_op: &mut OpWrapper<O>,
_state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
Initializes the algorithm Read more
sourcefn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether basic termination reasons apply. Read more
Auto Trait Implementations
impl<L, F> RefUnwindSafe for NewtonCG<L, F> where
F: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, F> Send for NewtonCG<L, F> where
F: Send,
L: Send,
impl<L, F> Sync for NewtonCG<L, F> where
F: Sync,
L: Sync,
impl<L, F> Unpin for NewtonCG<L, F> where
F: Unpin,
L: Unpin,
impl<L, F> UnwindSafe for NewtonCG<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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more