pub trait AssignmentCost: FiniteCost {
// Required method
fn checked_sub(&self, rhs: &Self) -> Option<Self>;
}Expand description
Additive, ordered cost used by certified assignment.
Assignment needs checked addition for totals and checked subtraction for min-cost-flow residual edges and dual certificates. Implementations must provide exact arithmetic: saturating or wrapping implementations violate the certificate contract.
Required Methods§
Sourcefn checked_sub(&self, rhs: &Self) -> Option<Self>
fn checked_sub(&self, rhs: &Self) -> Option<Self>
Exact checked subtraction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".