Struct segment_tree::ops::Pair
[−]
[src]
pub struct Pair<A, B> { /* fields omitted */ }
Store more information in each node.
Trait Implementations
impl<TA, TB, A: Operation<TA>, B: Operation<TB>> Operation<(TA, TB)> for Pair<A, B>
[src]
fn combine(a: &(TA, TB), b: &(TA, TB)) -> (TA, TB)
The operation that is performed to combine two intervals in the segment tree. Read more
fn combine_mut(a: &mut (TA, TB), b: &(TA, TB))
Replace the value in a with combine(a, b)
. This function exists to allow certain optimizations and by default simply calls combine
. Read more
fn combine_mut2(a: &(TA, TB), b: &mut (TA, TB))
Replace the value in a with combine(a, b)
. This function exists to allow certain optimizations and by default simply calls combine
. Read more
fn combine_left(a: (TA, TB), b: &(TA, TB)) -> (TA, TB)
Must return the same as combine
. This function exists to allow certain optimizations and by default simply calls combine_mut
. Read more
fn combine_right(a: &(TA, TB), b: (TA, TB)) -> (TA, TB)
Must return the same as combine
. This function exists to allow certain optimizations and by default simply calls combine_mut2
. Read more
fn combine_both(a: (TA, TB), b: (TA, TB)) -> (TA, TB)
Must return the same as combine
. This function exists to allow certain optimizations and by default simply calls combine_left
. Read more
impl<TA, TB, A: Inverse<TA>, B: Inverse<TB>> Inverse<(TA, TB)> for Pair<A, B>
[src]
fn uncombine(a: &mut (TA, TB), b: &(TA, TB))
Returns some value such that combine(uncombine(a, b), b) = a
.