pub trait Loss: Clone + Default {
// Required methods
fn zero() -> Self;
fn total() -> Self;
fn is_zero(&self) -> bool;
fn combine(self, other: Self) -> Self;
}Expand description
A measure of what didn’t survive a transformation.
Loss forms a monoid: zero() is the identity element, combine is
associative, and total() is the absorbing element (annihilator).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".