Safe Haskell | None |
---|
Fallback implementations of Series operators.
Code using these series operators is typically fused and vectorised by
the Repa plugin. If this transformation is successful then the resulting
GHC Core program will use primitives from the Data.Array.Repa.Series.Prim
module instead. If the fusion process is not successful then the implementations
in this module will be used directly.
- map :: forall k a b. (Unbox a, Unbox b) => (a -> b) -> Series k a -> Series k b
- map2 :: forall k a b c. (Unbox a, Unbox b, Unbox c) => (a -> b -> c) -> Series k a -> Series k b -> Series k c
- fold :: forall k a b. Unbox b => (a -> b -> a) -> a -> Series k b -> a
- foldIndex :: forall k a b. Unbox b => (Int# -> a -> b -> a) -> a -> Series k b -> a
- pack :: forall k1 k2 a. Unbox a => Sel1 k1 k2 -> Series k1 a -> Series k2 a
Documentation
map :: forall k a b. (Unbox a, Unbox b) => (a -> b) -> Series k a -> Series k bSource
Apply a function to all elements of a series.
map2 :: forall k a b c. (Unbox a, Unbox b, Unbox c) => (a -> b -> c) -> Series k a -> Series k b -> Series k cSource
Like zipWith
, but for equal-length series
fold :: forall k a b. Unbox b => (a -> b -> a) -> a -> Series k b -> aSource
Combine all elements of a series with an associative operator.