sdr-0.1.0.2: A software defined radio library

Safe HaskellNone
LanguageHaskell2010

SDR.VectorUtils

Description

Various Vector based utility functions

Synopsis

Documentation

mapAccumMV Source

Arguments

:: Monad m 
=> (acc -> x -> m (acc, y))

The function

-> acc

The initial accumulator

-> Stream m x

The input stream

-> Stream m y

The output stream

Like mapAccumL but monadic and over vectors. Doesn't return the accumulator at the end because it doesn't seem to be possible to do this with the Stream datatype, making this function pretty useless.

stride Source

Arguments

:: Vector v a 
=> Int

The stride

-> v a

The input Vector

-> v a

The output Vector

Create a vector from another vector containing only the elements that occur every stride elements in the source vector.

fill Source

Arguments

:: (PrimMonad m, Functor m, MVector vm a) 
=> MStream m a

The input Stream

-> vm (PrimState m) a

The mutable Vector to stream into

-> m () 

Fill a mutable vector from a monadic stream