Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. pattern LUA_GCSTEP :: GCCode

    lua Lua.Constants

    Performs an incremental step of garbage collection.

  2. enumFromStepN :: Num e => Comp -> e -> e -> Sz1 -> Vector D e

    massiv 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.

  3. rangeStep' :: (HasCallStack, Index ix) => Comp -> ix -> ix -> ix -> Array D ix ix

    massiv Data.Massiv.Array

    Same as rangeStepM, but will throw an error whenever step contains zeros.

    Example

    >>> import Data.Massiv.Array
    
    >>> rangeStep' Seq (Ix1 1) 2 6
    Array D Seq (Sz1 3)
    [ 1, 3, 5 ]
    

  4. rangeStepInclusive' :: (HasCallStack, Index ix) => Comp -> ix -> ix -> ix -> Array D ix ix

    massiv Data.Massiv.Array

    Just like range, except the finish index is included.

  5. rangeStepInclusiveM :: (MonadThrow m, Index ix) => Comp -> ix -> ix -> ix -> m (Array D ix ix)

    massiv Data.Massiv.Array

    Just like rangeStepM, except the finish index is included.

  6. rangeStepM :: (Index ix, MonadThrow m) => Comp -> ix -> ix -> ix -> m (Array D ix ix)

    massiv Data.Massiv.Array

    Same as range, but with a custom step. Throws Exceptions: IndexZeroException

    Examples

    >>> import Data.Massiv.Array
    
    >>> rangeStepM Seq (Ix1 1) 2 8
    Array D Seq (Sz1 4)
    [ 1, 3, 5, 7 ]
    
    >>> rangeStepM Seq (Ix1 1) 0 8
    *** Exception: IndexZeroException: 0
    

  7. rangeStepSize :: Index ix => Comp -> ix -> ix -> Sz ix -> Array D ix ix

    massiv Data.Massiv.Array

    Same as rangeSize, but with ability to specify the step.

  8. fromSteps :: Steps Id e -> Vector DS e

    massiv Data.Massiv.Array.Delayed

    O(1) - Convert Steps into delayed stream array

  9. toSteps :: Vector DS e -> Steps Id e

    massiv Data.Massiv.Array.Delayed

    O(1) - Convert delayed stream array into Steps.

  10. enumFromStepN :: Num e => Comp -> e -> e -> Sz1 -> Vector D e

    massiv Data.Massiv.Vector

    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.

Page 49 of many | Previous | Next