pub struct TerminationController { /* private fields */ }Implementations§
Source§impl TerminationController
impl TerminationController
pub fn new( criteria: TerminationCriteria, better_fitness: fn(f64, f64) -> bool, ) -> Self
pub fn is_valid(&self) -> bool
pub fn on_iteration(&mut self, iteration: usize)
pub fn on_evaluations(&mut self, evaluations: usize)
pub fn on_best_quality(&mut self, quality: f64, iteration: usize)
pub fn on_snapshot<T, Q>(&mut self, snapshot: &ExecutionStateSnapshot<T, Q>)
pub fn should_terminate(&mut self) -> bool
pub fn reason(&self) -> Option<&TerminationReason>
pub fn time_elapsed(&self) -> Duration
Trait Implementations§
Source§impl Clone for TerminationController
impl Clone for TerminationController
Source§fn clone(&self) -> TerminationController
fn clone(&self) -> TerminationController
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 moreAuto Trait Implementations§
impl Freeze for TerminationController
impl RefUnwindSafe for TerminationController
impl Send for TerminationController
impl Sync for TerminationController
impl Unpin for TerminationController
impl UnsafeUnpin for TerminationController
impl UnwindSafe for TerminationController
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