Hoogle Search
Within LTS Haskell 24.50 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fromNumArgs :: NumArgs -> CIntlua Lua.Types No documentation available.
fromNumResults :: NumResults -> CIntlua Lua.Types No documentation available.
enumFromN :: Num e => Comp -> e -> Sz1 -> Vector D emassiv Data.Massiv.Array Same as enumFromStepN with step dx = 1. Related: senumFromN, senumFromStepN, enumFromStepN, rangeSize, rangeStepSize, range
Examples
>>> import Data.Massiv.Array >>> enumFromN Seq (5 :: Double) 3 Array D Seq (Sz1 3) [ 5.0, 6.0, 7.0 ]
Similar:- Prelude.enumFromTo Very similar to [i .. i + n - 1], except that enumFromN is faster, but it only works for Num and not for Enum elements
- Data.Vector.Generic.enumFromN
enumFromStepN :: Num e => Comp -> e -> e -> Sz1 -> Vector D emassiv Data.Massiv.Array Enumerate from a starting number x exactly n times with a custom step value dx. Unlike senumFromStepN, there is no dependency on neigboring elements therefore enumFromStepN is parallelizable. Related: senumFromN, senumFromStepN, enumFromN, rangeSize, rangeStepSize, range, rangeStepM
Examples
>>> import Data.Massiv.Array >>> enumFromStepN Seq 1 (0.1 :: Double) 5 Array D Seq (Sz1 5) [ 1.0, 1.1, 1.2, 1.3, 1.4 ] >>> enumFromStepN Seq (-pi :: Float) (pi/4) 9 Array D Seq (Sz1 9) [ -3.1415927, -2.3561945, -1.5707964, -0.78539824, 0.0, 0.78539824, 1.5707963, 2.3561947, 3.1415927 ]
Similar:- Prelude.enumFrom Similar to take n [x, x + dx ..], except that enumFromStepN is parallelizable and it only works for Num and not for Enum elements. Floating point value will be slightly different as well.
- Data.Vector.Generic.enumFromStepN Similar in the outcome, but very different in the way it works.
-
massiv Data.Massiv.Array.Numeric Similar to liftArray2M, except it can be applied only to representations with Numeric instance and result representation stays the same.
signumA :: (Index ix, Numeric r e) => Array r ix e -> Array r ix emassiv Data.Massiv.Array.Numeric Apply signum to each element of the array
class (Size r, Num e) =>
FoldNumeric r emassiv Data.Massiv.Core No documentation available.
guardNumberOfElements :: (MonadThrow m, Index ix, Index ix') => Sz ix -> Sz ix' -> m ()massiv Data.Massiv.Core Throw SizeElementsMismatchException whenever number of elements in both sizes do not match.
guardNumberOfElements :: (MonadThrow m, Index ix, Index ix') => Sz ix -> Sz ix' -> m ()massiv Data.Massiv.Core.Index Throw SizeElementsMismatchException whenever number of elements in both sizes do not match.
splitNumChunks :: Int -> Int -> Int -> (Int, Int)massiv Data.Massiv.Core.Index Helper for figuring out the chunk length and slack start