pub struct LazySegmentTree<M: ActedMonoid> {
pub size: usize,
/* private fields */
}Expand description
遅延評価セグメント木
Fields§
§size: usizeImplementations§
Source§impl<M: ActedMonoid> LazySegmentTree<M>
impl<M: ActedMonoid> LazySegmentTree<M>
Sourcepub fn apply<R: RangeBounds<usize> + Debug>(&mut self, range: R, val: M::Act)
pub fn apply<R: RangeBounds<usize> + Debug>(&mut self, range: R, val: M::Act)
区間にvalを作用させる
range:[left, right)
Sourcepub fn get<R: RangeBounds<usize> + Debug>(&mut self, range: R) -> M::Val
pub fn get<R: RangeBounds<usize> + Debug>(&mut self, range: R) -> M::Val
区間を取得する
range:[left, right)
Trait Implementations§
Source§impl<M: Debug + ActedMonoid> Debug for LazySegmentTree<M>
impl<M: Debug + ActedMonoid> Debug for LazySegmentTree<M>
Source§impl<M: ActedMonoid> FromIterator<<M as ActedMonoid>::Val> for LazySegmentTree<M>
impl<M: ActedMonoid> FromIterator<<M as ActedMonoid>::Val> for LazySegmentTree<M>
Source§impl<M> ShowBinaryTree<usize> for LazySegmentTree<M>
impl<M> ShowBinaryTree<usize> for LazySegmentTree<M>
Source§fn print_node(&self, i: &usize) -> String
fn print_node(&self, i: &usize) -> String
<required> ノードの値を表示する
Source§fn print_as_binary_tree(&self)
fn print_as_binary_tree(&self)
2分木としてフォーマットする
Auto Trait Implementations§
impl<M> Freeze for LazySegmentTree<M>
impl<M> RefUnwindSafe for LazySegmentTree<M>
impl<M> Send for LazySegmentTree<M>
impl<M> Sync for LazySegmentTree<M>
impl<M> Unpin for LazySegmentTree<M>
impl<M> UnwindSafe for LazySegmentTree<M>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more