pub struct Termination {
pub max_evaluations: usize,
pub target: Option<f64>,
}Expand description
When an optimizer should stop.
Fields§
§max_evaluations: usizeMaximum number of objective evaluations.
target: Option<f64>Optional target: stop as soon as the minimized objective drops to or
below this value. None disables early exit.
Implementations§
Source§impl Termination
impl Termination
Sourcepub fn with_target(self, target: f64) -> Self
pub fn with_target(self, target: f64) -> Self
Adds an early-exit target (minimized sense).
Sourcepub fn target_met(&self, best: f64) -> bool
pub fn target_met(&self, best: f64) -> bool
True once best meets the target, if any.
Trait Implementations§
Source§impl Clone for Termination
impl Clone for Termination
Source§fn clone(&self) -> Termination
fn clone(&self) -> Termination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Termination
Source§impl Debug for Termination
impl Debug for Termination
Auto Trait Implementations§
impl Freeze for Termination
impl RefUnwindSafe for Termination
impl Send for Termination
impl Sync for Termination
impl Unpin for Termination
impl UnsafeUnpin for Termination
impl UnwindSafe for Termination
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
Mutably borrows from an owned value. Read more