pub struct StepSummary {
pub objective_sum: f64,
pub frame_count: usize,
pub weight_sum: f64,
pub per_frame_objective: BTreeMap<usize, f64>,
}Expand description
Universal, algorithm-neutral information produced by one batch step.
Fields§
§objective_sum: f64Sum of per-frame objectives multiplied by frame weights.
frame_count: usizeNumber of frames visited, including zero-weight frames.
weight_sum: f64Sum of non-negative reconstruction weights for visited frames.
per_frame_objective: BTreeMap<usize, f64>Unweighted objective for each visited acquisition-frame index.
Implementations§
Source§impl StepSummary
impl StepSummary
Sourcepub fn push_frame(&mut self, frame: usize, objective: f64, weight: f64)
pub fn push_frame(&mut self, frame: usize, objective: f64, weight: f64)
Accumulates one frame’s objective and reconstruction weight.
Sourcepub fn mean_objective(&self) -> Option<f64>
pub fn mean_objective(&self) -> Option<f64>
Returns the weight-normalized objective, or None when total weight is zero.
Trait Implementations§
Source§impl Clone for StepSummary
impl Clone for StepSummary
Source§fn clone(&self) -> StepSummary
fn clone(&self) -> StepSummary
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 moreSource§impl Debug for StepSummary
impl Debug for StepSummary
Source§impl Default for StepSummary
impl Default for StepSummary
Source§fn default() -> StepSummary
fn default() -> StepSummary
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StepSummary
impl<'de> Deserialize<'de> for StepSummary
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<M: Default> From<StepSummary> for StepOutput<M>
impl<M: Default> From<StepSummary> for StepOutput<M>
Source§fn from(summary: StepSummary) -> Self
fn from(summary: StepSummary) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StepSummary
impl RefUnwindSafe for StepSummary
impl Send for StepSummary
impl Sync for StepSummary
impl Unpin for StepSummary
impl UnsafeUnpin for StepSummary
impl UnwindSafe for StepSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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