Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
hmatrix Numeric.LinearAlgebra.Devel zipWith for Vectors
randomVector :: forall (n :: Nat) . KnownNat n => Seed -> RandDist -> R nhmatrix Numeric.LinearAlgebra.Static No documentation available.
withVector :: Vector ℝ -> (forall (n :: Nat) . KnownNat n => R n -> z) -> zhmatrix Numeric.LinearAlgebra.Static No documentation available.
-
hmatrix Numeric.LinearAlgebra.Static No documentation available.
chunkVector :: Vector v a => Int -> InputStream a -> IO (InputStream (v a))io-streams System.IO.Streams.Vector Splits an input stream into chunks of at most size n. Example:
ghci> (fromList [1..14::Int] >>= chunkVector 4 >>= toList) :: IO [Vector Int] [fromList [1,2,3,4],fromList [5,6,7,8],fromList [9,10,11,12],fromList [13,14]]
fromVector :: Vector v a => v a -> IO (InputStream a)io-streams System.IO.Streams.Vector Transforms a vector into an InputStream that yields each of the values in the vector in turn.
ghci> import Control.Monad ghci> import qualified System.IO.Streams as Streams ghci> import qualified Data.Vector as V ghci> let v = V.fromList [1, 2] ghci> is <- Streams.fromVector v ghci> replicateM 3 (Streams.read is) [Just 1,Just 2,Nothing]
mutableVectorOutputStream :: MVector v c => IO (OutputStream c, IO (v (PrimState IO) c))io-streams System.IO.Streams.Vector mutableVectorOutputStream returns an OutputStream which stores values fed into it and an action which flushes all stored values to a vector. The flush action resets the store. Note that this function will buffer any input sent to it on the heap. Please don't use this unless you're sure that the amount of input provided is bounded and will fit in memory without issues.
mutableVectorOutputStreamSized :: MVector v c => Int -> IO (OutputStream c, IO (v (PrimState IO) c))io-streams System.IO.Streams.Vector Like mutableVectorOutputStream, but allows control over how large the vector buffer is to start with.
outputToMutableVector :: MVector v a => (OutputStream a -> IO b) -> IO (v (PrimState IO) a)io-streams System.IO.Streams.Vector Given an IO action that requires an OutputStream, creates one and captures all the output the action sends to it as a mutable vector. Example:
ghci> import Control.Applicative ghci> (connect <$> fromList [1, 2, 3::Int]) >>= outputToMutableVector >>= V.freeze fromList [1,2,3]
-
io-streams System.IO.Streams.Vector Like outputToMutableVector, but allows control over how large the vector buffer is to start with.