pub trait ConsoliableWeight: Clone + Eq {
// Required methods
fn empty() -> Self;
fn consolidate(a: &Self, b: &Self) -> Self;
// Provided method
fn accure(&mut self, other: &Self) { ... }
}
Expand description
The weight type in a Treap. It is used to perform operations like calculating sums or maximum values of an interval in logrithmic time over treap.
Required Methods§
Sourcefn empty() -> Self
fn empty() -> Self
Create a default or ‘zero’ value for the weight. Consolidating with this value should not change the other value.
Sourcefn consolidate(a: &Self, b: &Self) -> Self
fn consolidate(a: &Self, b: &Self) -> Self
Combine two weights into a single one.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.