repa-series-1.0.0.1: Series Expressionss API

Safe HaskellNone

Data.Array.Repa.Series.Vector

Contents

Synopsis

Documentation

data Vector a Source

Abstract mutable vector type that supports random access indexing.

Use fromUnboxed and toUnboxed to convert to and from regular immutable unboxed vectors.

Instances

(Unbox a, Show a) => Show (Vector a) 

length :: Vector a -> Int#Source

Take the length of a vector.

new :: Unbox a => Int# -> IO (Vector a)Source

Create a new vector of the given length.

read :: Unbox a => Vector a -> Int# -> IO aSource

Read a value from a vector.

write :: Unbox a => Vector a -> Int# -> a -> IO ()Source

Write a value into a vector.

take :: Unbox a => Int# -> Vector a -> IO (Vector a)Source

Take the first n elements of a vector

Conversions

fromUnboxed :: Unbox a => Vector a -> IO (Vector a)Source

O(1). Convert from an Unboxed vector.

toUnboxed :: Unbox a => Vector a -> IO (Vector a)Source

O(1). Convert to an Unboxed vector.