[−][src]Struct mathru::optimization::Newton
Newton's method
f \colon \mathbb{R}^n \to \mathbb{R}
is a twice differentiable function.
Newton's method solves the minimization problem
f(x) \to min
input: $f \colon \mathbb{R}^{n} \to \mathbb{R}
$ with initial approximation $x_{0} \in \mathbb{R}^{n}
$
output: $x_{k}
$
-
Initialization: Choose $
\sigma \in (0, 1)
$$
\rho > 0, k := 0
$ -
Solve de equation system $
\nabla^{2} f(x_{k})d_{k} = -\nabla f(x_{k})
$ -
If the euqation is not solvable, or the condition $
\nabla f(x_{k})^{T}d_{k} \leq -\rho \lvert \lvert \nabla f(x_k) \rvert \rvert_{2}^{2}
$ is not fullfilledThan $
d_{k} := \nabla f(x_{k})
$ -
$
\alpha_{k} := 1
$ -
while $
f(x_{k} + \alpha_{k}d_{k}) > f(x_{k}) + \sigma \alpha_{k} \nabla f(x_{k})^{T}d_{k}
$set $
\alpha_{k}
$ -
$
x_{k + 1} := x_{k} + d_{k}
$ -
$
k := k + 1
$ go to 2.
Methods
impl<T> Newton<T>
[src]
impl<T> Newton<T> where
T: Real,
[src]
T: Real,
pub fn minimize<F>(&self, func: &F, x_0: &Vector<T>) -> OptimResult<Vector<T>> where
F: Optim<T>,
[src]
F: Optim<T>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Newton<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Newton<T> where
T: Send,
T: Send,
impl<T> Sync for Newton<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Newton<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Newton<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,