pub struct EdgeVerifier { /* private fields */ }Expand description
Accumulates multiple conservation checks and produces a summary report.
Implementations§
Source§impl EdgeVerifier
impl EdgeVerifier
Sourcepub fn with_clock(now_fn: fn() -> u64) -> Self
pub fn with_clock(now_fn: fn() -> u64) -> Self
Create a verifier with a custom clock (useful for testing).
Sourcepub fn verify(
&mut self,
parts: &[f64],
total: f64,
tolerance: f64,
label: &str,
) -> bool
pub fn verify( &mut self, parts: &[f64], total: f64, tolerance: f64, label: &str, ) -> bool
Verify sum(parts) == total within tolerance and record the result.
Sourcepub fn verify_det(&mut self, m: &[f64; 4], expected: f64, label: &str) -> bool
pub fn verify_det(&mut self, m: &[f64; 4], expected: f64, label: &str) -> bool
Verify a 2×2 determinant and record the result.
Sourcepub fn summary(self) -> SummaryReport
pub fn summary(self) -> SummaryReport
Consume the verifier and produce a summary.
Auto Trait Implementations§
impl Freeze for EdgeVerifier
impl RefUnwindSafe for EdgeVerifier
impl Send for EdgeVerifier
impl Sync for EdgeVerifier
impl Unpin for EdgeVerifier
impl UnsafeUnpin for EdgeVerifier
impl UnwindSafe for EdgeVerifier
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