[−][src]Struct contest_algorithms::range_query::dynamic_arq::DynamicArq   
A dynamic, and optionally persistent, associative range query data structure.
Methods
impl<T: ArqSpec> DynamicArq<T>[src]
pub fn new(is_persistent: bool) -> Self[src]
Initializes the data structure without creating any nodes.
pub fn build_from_identity(&mut self, size: i64) -> ArqView[src]
Lazily builds a tree initialized to the identity.
pub fn build_from_slice(&mut self, init_val: &[T::M]) -> ArqView[src]
Builds a tree whose leaves are set to a given non-empty slice.
pub fn merge_equal_sized(
    &mut self, 
    (lp, ls): ArqView, 
    (rp, rs): ArqView
) -> ArqView[src]
&mut self,
(lp, ls): ArqView,
(rp, rs): ArqView
) -> ArqView
Merges two balanced subtrees into a single tree with a 0-indexed view.
pub fn push(&mut self, (p, s): ArqView) -> (ArqView, ArqView)[src]
pub fn modify(&mut self, view: ArqView, l: i64, r: i64, f: &T::F) -> ArqView[src]
Applies the endomorphism f to all entries from l to r, inclusive. If l == r, the updates are eager. Otherwise, they are lazy.
pub fn query(&mut self, view: ArqView, l: i64, r: i64) -> T::M[src]
Returns the aggregate range query on all entries from l to r, inclusive.
Auto Trait Implementations
impl<T> RefUnwindSafe for DynamicArq<T> where
    <T as ArqSpec>::F: RefUnwindSafe,
    <T as ArqSpec>::M: RefUnwindSafe, 
<T as ArqSpec>::F: RefUnwindSafe,
<T as ArqSpec>::M: RefUnwindSafe,
impl<T> Send for DynamicArq<T> where
    <T as ArqSpec>::F: Send,
    <T as ArqSpec>::M: Send, 
<T as ArqSpec>::F: Send,
<T as ArqSpec>::M: Send,
impl<T> Sync for DynamicArq<T> where
    <T as ArqSpec>::F: Sync,
    <T as ArqSpec>::M: Sync, 
<T as ArqSpec>::F: Sync,
<T as ArqSpec>::M: Sync,
impl<T> Unpin for DynamicArq<T> where
    <T as ArqSpec>::F: Unpin,
    <T as ArqSpec>::M: Unpin, 
<T as ArqSpec>::F: Unpin,
<T as ArqSpec>::M: Unpin,
impl<T> UnwindSafe for DynamicArq<T> where
    <T as ArqSpec>::F: UnwindSafe,
    <T as ArqSpec>::M: UnwindSafe, 
<T as ArqSpec>::F: UnwindSafe,
<T as ArqSpec>::M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
    T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
    T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
    U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
    U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, [src]
U: TryFrom<T>,