Trait treap_map::ConsoliableWeight
source · 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§
Object Safety§
This trait is not object safe.