Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cumulative sum in one dimension.
Synopsis
- csum1D :: (Num a, Unbox a) => Vector a -> Vector a
- (+!) :: (HasCallStack, Num a, Unbox a) => Vector a -> (Int, Int) -> a
- newCSumU :: (PrimMonad m, Num a, Unbox a) => Int -> m (MVector (PrimState m) a)
- readCSum :: (PrimMonad m, Num a, MVector v a) => v (PrimState m) a -> Int -> Int -> m a
- appendCSum :: (PrimMonad m, Num a, MVector v a) => v (PrimState m) a -> Int -> a -> m ()
Documentation
csum1D :: (Num a, Unbox a) => Vector a -> Vector a #
\(O(N)\) Immutable cumulative sum initialization. The first element is a guard.
(+!) :: (HasCallStack, Num a, Unbox a) => Vector a -> (Int, Int) -> a #
\(O(1)\) Retrieves a range sum from an immutable cumulative sum.
newCSumU :: (PrimMonad m, Num a, Unbox a) => Int -> m (MVector (PrimState m) a) #
\(O(N)\) Initialization of a mutable cumulative sum.