pub struct DynamicArq<T: ArqSpec> { /* private fields */ }
Expand description
A dynamic, and optionally persistent, associative range query data structure.
Implementations§
Source§impl<T: ArqSpec> DynamicArq<T>
impl<T: ArqSpec> DynamicArq<T>
Sourcepub fn new(is_persistent: bool) -> Self
pub fn new(is_persistent: bool) -> Self
Initializes the data structure without creating any nodes.
Sourcepub fn build_from_identity(&mut self, size: i64) -> ArqView
pub fn build_from_identity(&mut self, size: i64) -> ArqView
Lazily builds a tree initialized to the identity.
Sourcepub fn build_from_slice(&mut self, init_val: &[T::S]) -> ArqView
pub fn build_from_slice(&mut self, init_val: &[T::S]) -> ArqView
Builds a tree whose leaves are set to a given non-empty slice.
Sourcepub fn merge_equal_sized(
&mut self,
(lp, ls): ArqView,
(rp, rs): ArqView,
) -> ArqView
pub fn merge_equal_sized( &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)
pub fn pull(&mut self, p: usize)
Auto Trait Implementations§
impl<T> Freeze for DynamicArq<T>
impl<T> RefUnwindSafe for DynamicArq<T>
impl<T> Send for DynamicArq<T>
impl<T> Sync for DynamicArq<T>
impl<T> Unpin for DynamicArq<T>
impl<T> UnwindSafe for DynamicArq<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more