Struct competitive_programming_rs::data_structure::segment_tree::SegmentTree[][src]

pub struct SegmentTree<T, Op, Init> { /* fields omitted */ }

Segment Tree for range queries

Implementations

impl<T, Op, Init> SegmentTree<T, Op, Init> where
    T: Copy,
    Op: Fn(T, T) -> T,
    Init: Fn() -> T, 
[src]

pub fn new(size: usize, op: Op, initialize: Init) -> SegmentTree<T, Op, Init>[src]

pub fn update(&mut self, k: usize, value: T)[src]

pub fn query(&self, range: Range<usize>) -> T[src]

Get the minimum value in the array in the range

Auto Trait Implementations

impl<T, Op, Init> RefUnwindSafe for SegmentTree<T, Op, Init> where
    Init: RefUnwindSafe,
    Op: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, Op, Init> Send for SegmentTree<T, Op, Init> where
    Init: Send,
    Op: Send,
    T: Send

impl<T, Op, Init> Sync for SegmentTree<T, Op, Init> where
    Init: Sync,
    Op: Sync,
    T: Sync

impl<T, Op, Init> Unpin for SegmentTree<T, Op, Init> where
    Init: Unpin,
    Op: Unpin,
    T: Unpin

impl<T, Op, Init> UnwindSafe for SegmentTree<T, Op, Init> where
    Init: UnwindSafe,
    Op: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.