pub struct PersistentSegmentTree {
pub n: usize,
pub num_versions: usize,
pub root_per_version: Vec<usize>,
pub nodes: Vec<(i64, usize, usize)>,
}Fields§
§n: usize§num_versions: usize§root_per_version: Vec<usize>§nodes: Vec<(i64, usize, usize)>Implementations§
Source§impl PersistentSegmentTree
impl PersistentSegmentTree
pub fn new(n: usize) -> Self
pub fn space_complexity(&self) -> String
pub fn time_complexity(&self) -> String
pub fn range_query_version(&self, version: usize, _l: usize, _r: usize) -> i64
Trait Implementations§
Source§impl Clone for PersistentSegmentTree
impl Clone for PersistentSegmentTree
Source§fn clone(&self) -> PersistentSegmentTree
fn clone(&self) -> PersistentSegmentTree
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PersistentSegmentTree
impl RefUnwindSafe for PersistentSegmentTree
impl Send for PersistentSegmentTree
impl Sync for PersistentSegmentTree
impl Unpin for PersistentSegmentTree
impl UnsafeUnpin for PersistentSegmentTree
impl UnwindSafe for PersistentSegmentTree
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