pub struct FitController<E: Equation + Send + 'static> { /* private fields */ }Expand description
A running fit that you advance one cycle at a time.
It’s ready to go as soon as it’s built, so the first step runs cycle 1.
The accessors read the current state between steps, and finish or
into_result turn it into a result.
Implementations§
Source§impl<E: Equation + Send + 'static> FitController<E>
impl<E: Equation + Send + 'static> FitController<E>
Sourcepub fn request_stop(&mut self)
pub fn request_stop(&mut self)
Flag the fit as Aborted so the result shows an early stop.
This only sets the status; it won’t halt a later step, which runs a full
cycle and overwrites it. Call it just before into_result.
Sourcepub fn likelihood(&self) -> f64
pub fn likelihood(&self) -> f64
The current log-likelihood.
Sourcepub fn error_models(&self) -> &AssayErrorModels
pub fn error_models(&self) -> &AssayErrorModels
The current error models (updated when the algorithm optimizes them).
Sourcepub fn finish(self) -> Result<NonParametricResult<E>>
pub fn finish(self) -> Result<NonParametricResult<E>>
Run the fit to completion and return the result.
Safe to call anytime: if the fit has already stopped, it just returns the result.
Sourcepub fn into_result(self) -> Result<NonParametricResult<E>>
pub fn into_result(self) -> Result<NonParametricResult<E>>
Turn the current state into a result as-is, without running more cycles.
Auto Trait Implementations§
impl<E> Freeze for FitController<E>
impl<E> !RefUnwindSafe for FitController<E>
impl<E> Send for FitController<E>
impl<E> Sync for FitController<E>
impl<E> Unpin for FitController<E>
impl<E> UnsafeUnpin for FitController<E>
impl<E> !UnwindSafe for FitController<E>
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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.