pub struct Options<'a, F> {
pub method: Option<Method>,
pub bounds: Option<Bounds<'a, F>>,
pub tolerance: Option<F>,
pub evaluations: Option<usize>,
pub population: Option<usize>,
pub seed: u64,
}Expand description
What a front runs and when it stops. Options::default() lets Method::choose pick the method and leaves every variable unbounded.
Fields§
§method: Option<Method>The method, or None for the one Method::choose picks.
bounds: Option<Bounds<'a, F>>Limits on the variables. L-BFGS, Levenberg–Marquardt and the Krylov methods take none, and differential evolution needs finite ones. For Brent’s method solving an equation, finite limits are the bracket.
tolerance: Option<F>The relative change at which a method stops, or None for √ε of F. A Krylov method stops when its residual’s norm falls to tolerance times its right-hand side’s.
evaluations: Option<usize>The most evaluations of the function, or None for 1000 for each variable, plus 1000, and for differential evolution another 1000 for each member of its population. For solve_linear, the most products with the matrix and its transpose, or None for 20 for each unknown, plus 20.
population: Option<usize>Differential evolution’s population, or None for 15 for each variable, and at least 5.
seed: u64The seed of differential evolution’s generator.
Implementations§
Source§impl<F> Options<'_, F>where
F: Native,
impl<F> Options<'_, F>where
F: Native,
Sourcepub fn method_for(&self, task: Task, variables: usize) -> Method
pub fn method_for(&self, task: Task, variables: usize) -> Method
The method a front runs for task on variables variables: method, or the one Method::choose picks.
Trait Implementations§
impl<'a, F> Copy for Options<'a, F>where
F: Copy,
Auto Trait Implementations§
impl<'a, F> Forget for Options<'a, F>
impl<'a, F> Freeze for Options<'a, F>
impl<'a, F> RefUnwindSafe for Options<'a, F>
impl<'a, F> Send for Options<'a, F>
impl<'a, F> Sync for Options<'a, F>
impl<'a, F> Unpin for Options<'a, F>
impl<'a, F> UnsafeUnpin for Options<'a, F>
impl<'a, F> UnwindSafe for Options<'a, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more