pub struct IterationStats {
pub iteration: usize,
pub cost: f64,
pub cost_change: f64,
pub gradient_norm: f64,
pub step_norm: f64,
pub tr_ratio: f64,
pub tr_radius: f64,
pub ls_iter: usize,
pub iter_time_ms: f64,
pub total_time_ms: f64,
pub accepted: bool,
}Expand description
Per-iteration statistics for detailed logging (Ceres-style output).
Captures all relevant metrics for each optimization iteration, enabling detailed analysis and debugging of the optimization process.
Fields§
§iteration: usizeIteration number (0-indexed)
cost: f64Cost function value at this iteration
cost_change: f64Change in cost from previous iteration
gradient_norm: f64L2 norm of the gradient (||J^T·r||)
step_norm: f64L2 norm of the parameter update step (||Δx||)
tr_ratio: f64Trust region ratio (ρ = actual_reduction / predicted_reduction)
tr_radius: f64Trust region radius (Δ)
ls_iter: usizeLinear solver iterations (0 for direct solvers like Cholesky)
iter_time_ms: f64Time taken for this iteration in milliseconds
total_time_ms: f64Total elapsed time since optimization started in milliseconds
accepted: boolWhether the step was accepted (true) or rejected (false)
Implementations§
Source§impl IterationStats
impl IterationStats
Sourcepub fn print_header()
pub fn print_header()
Print table header in Ceres-style format
Sourcepub fn print_line(&self)
pub fn print_line(&self)
Print single iteration line in Ceres-style format with scientific notation
Trait Implementations§
Source§impl Clone for IterationStats
impl Clone for IterationStats
Source§fn clone(&self) -> IterationStats
fn clone(&self) -> IterationStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for IterationStats
impl RefUnwindSafe for IterationStats
impl Send for IterationStats
impl Sync for IterationStats
impl Unpin for IterationStats
impl UnwindSafe for IterationStats
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
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.