pub struct SolveStats {
pub status: SolveStatus,
pub mismatch_history: Vec<f64>,
}Expand description
How a Newton-Raphson solve terminated, plus the per-iteration convergence trace it used to print to stdout.
The solve loop is silent: at batch scale (crate::batch::BatchSolver)
per-iteration println! would serialize every worker on the stdout lock
and dominate the measurement. Callers that want the old progress output
reconstruct it from mismatch_history — see
src/main.rs, which reproduces it verbatim.
Fields§
§status: SolveStatus§mismatch_history: Vec<f64>Max |mismatch| measured at the top of each iteration, in order. The
last element is the value the convergence check accepted (for
Converged) or rejected. Length is the iteration count — see
iterations.
Implementations§
Source§impl SolveStats
impl SolveStats
pub fn from_loop(status: SolveStatus, mismatch_history: Vec<f64>) -> Self
Sourcepub fn iterations(&self) -> usize
pub fn iterations(&self) -> usize
Iterations actually run. Derived from mismatch_history rather than
stored separately so the two can’t drift apart.
Sourcepub fn final_mismatch(&self) -> f64
pub fn final_mismatch(&self) -> f64
Max |mismatch| at the final iteration, or 0.0 if none ran.
Trait Implementations§
Source§impl Clone for SolveStats
impl Clone for SolveStats
Source§impl Debug for SolveStats
impl Debug for SolveStats
Source§impl PartialEq for SolveStats
impl PartialEq for SolveStats
impl StructuralPartialEq for SolveStats
Auto Trait Implementations§
impl Freeze for SolveStats
impl RefUnwindSafe for SolveStats
impl Send for SolveStats
impl Sync for SolveStats
impl Unpin for SolveStats
impl UnsafeUnpin for SolveStats
impl UnwindSafe for SolveStats
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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