Skip to main content

VecActSegtree

Struct VecActSegtree 

Source
pub struct VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,
{ /* private fields */ }

Implementations§

Source§

impl<A> VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source

pub fn new(len: usize) -> Self
where A: Default,

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Trait Implementations§

Source§

impl<A, B> Act<B> for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone, B: RangeBounds<usize>,

Source§

type Action = A

r で指定される区間に作用を行う。
Source§

fn act(&mut self, b: B, op: <A::Operator as Magma>::Set)

Source§

impl<A> Clone for VecActSegtree<A>
where A: MonoidAction + Clone, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone, A::Operand: Clone, A::Operator: Clone,

Source§

fn clone(&self) -> VecActSegtree<A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A> Debug for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A> Default for VecActSegtree<A>

Source§

fn default() -> VecActSegtree<A>

Returns the “default value” for a type. Read more
Source§

impl<A, B> Fold<B> for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone, B: RangeBounds<usize>,

Source§

type Output = <A as MonoidAction>::Operand

Source§

fn fold(&self, b: B) -> <Self::Output as Magma>::Set

r で指定される区間の和を返す。
Source§

impl<A> FoldBisect for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

fn fold_bisect<F>( &self, l: usize, pred: F, ) -> (usize, <A::Operand as Magma>::Set)
where F: Fn(&<A::Operand as Magma>::Set) -> bool,

添字 l と述語 pred を引数に取り、次の条件を満たす r を返す。 ただし、区間長を n とする。 Read more
Source§

impl<A> FoldBisectRev for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

fn fold_bisect_rev<F>( &self, r: usize, pred: F, ) -> (usize, <A::Operand as Magma>::Set)
where F: Fn(&<A::Operand as Magma>::Set) -> bool,

添字 r と述語 pred を引数に取り、次の条件を満たす l を返す。 Read more
Source§

impl<A> From<(Vec<<<A as MonoidAction>::Operand as Magma>::Set>, A)> for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

fn from((v, action): (Vec<<A::Operand as Magma>::Set>, A)) -> Self

Converts to this type from the input type.
Source§

impl<A> From<Vec<<<A as MonoidAction>::Operand as Magma>::Set>> for VecActSegtree<A>
where A: MonoidAction + Default, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

fn from(v: Vec<<A::Operand as Magma>::Set>) -> Self

Converts to this type from the input type.
Source§

impl<A> From<VecActSegtree<A>> for Vec<<A::Operand as Magma>::Set>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

fn from(v: VecActSegtree<A>) -> Self

Converts to this type from the input type.
Source§

impl<'a, A> GetMut<'a> for VecActSegtree<A>
where A: MonoidAction + 'a, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone,

Source§

type Output = GetMutIndex<'a, A>

Source§

fn get_mut(&'a mut self, index: usize) -> Option<GetMutIndex<'a, A>>

Auto Trait Implementations§

§

impl<A> !Freeze for VecActSegtree<A>

§

impl<A> !RefUnwindSafe for VecActSegtree<A>

§

impl<A> Send for VecActSegtree<A>
where <<A as MonoidAction>::Operand as Magma>::Set: Sized + Send, <<A as MonoidAction>::Operator as Magma>::Set: Sized + Send, A: Send,

§

impl<A> !Sync for VecActSegtree<A>

§

impl<A> Unpin for VecActSegtree<A>
where <<A as MonoidAction>::Operand as Magma>::Set: Sized + Unpin, <<A as MonoidAction>::Operator as Magma>::Set: Sized + Unpin, A: Unpin,

§

impl<A> UnsafeUnpin for VecActSegtree<A>
where <<A as MonoidAction>::Operand as Magma>::Set: Sized, <<A as MonoidAction>::Operator as Magma>::Set: Sized, A: UnsafeUnpin,

§

impl<A> UnwindSafe for VecActSegtree<A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V