Skip to main content

Crate edge_conservation

Crate edge_conservation 

Source

Structs§

ConservationReport
Result of a single conservation-law check.
EdgeVerifier
Accumulates multiple conservation checks and produces a summary report.
SummaryReport
Summary report from EdgeVerifier.

Constants§

DEFAULT_TOLERANCE
Default tolerance for floating-point comparisons.

Functions§

kl_divergence
Compute KL divergence D(p || q) in base-2.
shannon_entropy
Compute Shannon entropy in base-2 for a probability distribution.
verify_conservation
Verify that the sum of parts equals total within tolerance.
verify_conservation_with_tolerance
Same as verify_conservation but with an explicit tolerance.
verify_determinant
Verify the determinant of a 2×2 matrix against an expected value.