Struct segment_tree::ops::Add [] [src]

pub struct Add;

Each node contains the sum of the interval it represents.

Trait Implementations

impl<T: Add<Output = T> + Copy> Operation<T> for Add
[src]

The operation that is performed to combine two intervals in the segment tree. Read more

Replace the value in a with combine(a, b). This function exists to allow certain optimizations and by default simply calls combine. Read more

Replace the value in a with combine(a, b). This function exists to allow certain optimizations and by default simply calls combine. Read more

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_mut. Read more

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_mut2. Read more

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_left. Read more

impl<T: Sub<Output = T> + Copy> Inverse<T> for Add
[src]

Returns some value such that combine(uncombine(a, b), b) = a.

impl<T: Add<Output = T> + Copy> CommutativeOperation<T> for Add
[src]

impl Identity<u8> for Add
[src]

Returns any identity.

impl Identity<u16> for Add
[src]

Returns any identity.

impl Identity<u32> for Add
[src]

Returns any identity.

impl Identity<u64> for Add
[src]

Returns any identity.

impl Identity<i8> for Add
[src]

Returns any identity.

impl Identity<i16> for Add
[src]

Returns any identity.

impl Identity<i32> for Add
[src]

Returns any identity.

impl Identity<i64> for Add
[src]

Returns any identity.

impl Identity<f32> for Add
[src]

Returns any identity.

impl Identity<f64> for Add
[src]

Returns any identity.

impl Identity<usize> for Add
[src]

Returns any identity.

impl Identity<isize> for Add
[src]

Returns any identity.

impl<T> Identity<Wrapping<T>> for Add where
    Add: Identity<T>, 
[src]

Returns any identity.