pub struct LazySegTreeAddMaxSpec<T>(/* private fields */);
Expand description
Specification for lazy segment trees that perform range add updates with maximum queries.
This spec works with data type T
where:
T
supports addition and multiplication by usizeT
has a zero constant and supports ordering- Updates are applied uniformly to all elements in a range
Trait Implementations§
Source§impl<T> LazySegTreeSpec for LazySegTreeAddMaxSpec<T>
impl<T> LazySegTreeSpec for LazySegTreeAddMaxSpec<T>
type T = T
type U = T
Source§fn op_on_data(d1: &Self::T, d2: &Self::T) -> Self::T
fn op_on_data(d1: &Self::T, d2: &Self::T) -> Self::T
Combine two child values into a parent value.
Source§fn op_on_update(u1: &Self::U, u2: &Self::U) -> Self::U
fn op_on_update(u1: &Self::U, u2: &Self::U) -> Self::U
Compose two updates. If update
a
is applied before b
, then the
composed update should be op_on_update(a, b)
(document the intended
order in non-commutative cases).Auto Trait Implementations§
impl<T> Freeze for LazySegTreeAddMaxSpec<T>
impl<T> RefUnwindSafe for LazySegTreeAddMaxSpec<T>where
T: RefUnwindSafe,
impl<T> Send for LazySegTreeAddMaxSpec<T>where
T: Send,
impl<T> Sync for LazySegTreeAddMaxSpec<T>where
T: Sync,
impl<T> Unpin for LazySegTreeAddMaxSpec<T>where
T: Unpin,
impl<T> UnwindSafe for LazySegTreeAddMaxSpec<T>where
T: UnwindSafe,
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