[][src]Struct sfcpl::structure::accumulate::Accumulate

pub struct Accumulate<T>(_);

累積和型

初期化 O(n) 区間 O(1) 更新は作り直す以外に出来ない

逆操作はimos法,

Implementations

impl<T: Zero + Copy + Add<Output = T> + Sub<Output = T>> Accumulate<T>[src]

pub fn sum(&self, i: usize) -> T[src]

[0, i)の総和

pub fn pertical_sum(&self, i: usize, j: usize) -> T[src]

累積和を利用して[i, j)間の総和をO(1)で求める

Trait Implementations

impl<T: Clone> Clone for Accumulate<T>[src]

impl<T: Debug> Debug for Accumulate<T>[src]

impl<T: Zero + Add<Output = T> + Copy> Index<usize> for Accumulate<T>[src]

type Output = T

The returned type after indexing.

impl<T: PartialEq> PartialEq<Accumulate<T>> for Accumulate<T>[src]

impl<T> StructuralPartialEq for Accumulate<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Accumulate<T> where
    T: RefUnwindSafe

impl<T> Send for Accumulate<T> where
    T: Send

impl<T> Sync for Accumulate<T> where
    T: Sync

impl<T> Unpin for Accumulate<T> where
    T: Unpin

impl<T> UnwindSafe for Accumulate<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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