[][src]Struct mathru::optimization::Newton

pub struct Newton<T> { /* fields omitted */ }

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}$

  1. Initialization: Choose $\sigma \in (0, 1)$

    $\rho > 0, k := 0$

  2. Solve de equation system $\nabla^{2} f(x_{k})d_{k} = -\nabla f(x_{k})$ 3. 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 fullfilled Than $d_{k} := \nabla f(x_{k})$

  3. $\alpha_{k} := 1$

  4. while $f(x_{k} + \alpha_{k}d_{k}) > f(x_{k}) + \sigma \alpha_{k} \nabla f(x_{k})^{T}d_{k}$ set $\alpha_{k}$ 6. $x_{k + 1} := x_{k} + d_{k}$ 7. $k := k + 1$ go to 2.

Implementations

impl<T> Newton<T>[src]

pub fn new(iters: u64, sigma: T, rho: T) -> Newton<T>[src]

Creates an instance of newtons method

Arguments

  • 'iters': Number of iterations

impl<T> Newton<T> where
    T: Real
[src]

pub fn minimize<F>(&self, func: &F, x_0: &Vector<T>) -> OptimResult<Vector<T>> where
    F: Optim<T>, 
[src]

Minimize function func

Arguments

  • 'func0': Function to be minimized
  • 'x_0': Initial guess for the minimum

Return

local minimum

Auto Trait Implementations

impl<T> RefUnwindSafe for Newton<T> where
    T: RefUnwindSafe

impl<T> Send for Newton<T> where
    T: Send

impl<T> Sync for Newton<T> where
    T: Sync

impl<T> Unpin for Newton<T> where
    T: Unpin

impl<T> UnwindSafe for Newton<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,