pub struct CumSum<T> { /* private fields */ }Expand description
CumSum is a struct that contains vec of cumulative sum.
let x = vec![1, 2, 3];
let cs = k0i::cumsum::CumSum::new(&x);
assert_eq!(cs.sec_ref(), &[0, 1, 3, 6]);Implementations
sourceimpl<T> CumSum<T> where
T: PartialOrd + Copy + Default + Add<Output = T> + Sub<Output = T>,
impl<T> CumSum<T> where
T: PartialOrd + Copy + Default + Add<Output = T> + Sub<Output = T>,
Auto Trait Implementations
impl<T> RefUnwindSafe for CumSum<T> where
T: RefUnwindSafe,
impl<T> Send for CumSum<T> where
T: Send,
impl<T> Sync for CumSum<T> where
T: Sync,
impl<T> Unpin for CumSum<T> where
T: Unpin,
impl<T> UnwindSafe for CumSum<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more