pub trait CumSum<T> {
    fn cumsum(&self) -> Vec<T>;
}
Expand description

Returns the cumulative sum.

use k0i::cumsum::CumSum;
let x = vec![1, 2, 3,7];
let cumsum = x.cumsum();
assert_eq!(cumsum, [0, 1, 3, 6, 13]);

Required Methods

Implementations on Foreign Types

Implementors