Skip to main content

NelderMead

Struct NelderMead 

Source
pub struct NelderMead {
    pub initial_step: f64,
    pub tolerance: f64,
    pub max_iterations: usize,
}
Expand description

Options for nelder_mead.

initial_step sizes the starting simplex: each coordinate of the start point is moved by initial_step times its absolute value (a relative step), or by initial_step itself when that absolute value is below 1, so a start at or near zero still gets a simplex of useful size. initial_step must be finite and larger than tolerance, or the starting simplex could already pass the convergence test; otherwise nelder_mead does not search. The search has converged when the spread of the simplex’s values is within tolerance times max(1, |best value|) and every vertex is within tolerance times max(1, |best x|) of the best one in each coordinate. max_iterations counts simplex moves over both passes (see nelder_mead).

use prospicio_math::optimize::NelderMead;

let options = NelderMead { tolerance: 1e-12, ..NelderMead::default() };
assert_eq!(options.initial_step, 0.1);

Fields§

§initial_step: f64

Size of the starting simplex, relative to each coordinate of absolute value 1 or more.

§tolerance: f64

Convergence tolerance on both the values and the simplex diameter.

§max_iterations: usize

Most simplex moves allowed in total.

Trait Implementations§

Source§

impl Clone for NelderMead

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NelderMead

Source§

impl Debug for NelderMead

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NelderMead

Source§

fn default() -> Self

A 10% starting step, tolerance 1e-10 and 10 000 iterations.

Source§

impl PartialEq for NelderMead

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NelderMead

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.