pub struct ConservationReport {
pub before: f64,
pub after: f64,
pub delta: f64,
pub violations: Vec<EntropyViolation>,
}Expand description
Report on conservation-law compliance for a sequence of changes.
Fields§
§before: f64Shannon entropy before changes.
after: f64Shannon entropy after changes.
delta: f64Net change in entropy.
violations: Vec<EntropyViolation>Individual violations (entropy increases).
Implementations§
Source§impl ConservationReport
impl ConservationReport
Sourcepub fn from_snapshots(snapshots: &[VerificationEntropy]) -> Self
pub fn from_snapshots(snapshots: &[VerificationEntropy]) -> Self
Build a conservation report from a sequence of entropy snapshots.
Each pair of consecutive values represents a change. Any increase is flagged as a violation.
Sourcepub fn is_conserved(&self) -> bool
pub fn is_conserved(&self) -> bool
Whether the overall change obeys the conservation law.
Sourcepub fn total_violation(&self) -> f64
pub fn total_violation(&self) -> f64
Severity: total magnitude of all violations.
Trait Implementations§
Source§impl Clone for ConservationReport
impl Clone for ConservationReport
Source§fn clone(&self) -> ConservationReport
fn clone(&self) -> ConservationReport
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 ConservationReport
impl Debug for ConservationReport
Source§impl<'de> Deserialize<'de> for ConservationReport
impl<'de> Deserialize<'de> for ConservationReport
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
Auto Trait Implementations§
impl Freeze for ConservationReport
impl RefUnwindSafe for ConservationReport
impl Send for ConservationReport
impl Sync for ConservationReport
impl Unpin for ConservationReport
impl UnsafeUnpin for ConservationReport
impl UnwindSafe for ConservationReport
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