Safe Haskell | Safe-Infered |
---|
Irregular two dimensional arrays.
- data Vectors a = Vectors !Int !ByteArray !ByteArray !(ArrayArray ByteArray)
- class Prim a => Unboxes a
- empty :: Vectors a
- singleton :: (Unboxes a, Unbox a) => Vector a -> Vectors a
- length :: Unboxes a => Vectors a -> Int
- unsafeIndex :: (Unboxes a, Unbox a) => Vectors a -> Int -> Vector a
- unsafeIndex2 :: Unboxes a => Vectors a -> Int -> Int -> a
- unsafeIndexUnpack :: Unboxes a => Vectors a -> Int -> (ByteArray, Int, Int)
- append :: (Unboxes a, Unbox a) => Vectors a -> Vectors a -> Vectors a
- fromVector :: (Unboxes a, Unbox a) => Vector (Vector a) -> Vectors a
- toVector :: (Unboxes a, Unbox a) => Vectors a -> Vector (Vector a)
Documentation
A 2-dimensional array, where the inner arrays can all have different lengths.
singleton :: (Unboxes a, Unbox a) => Vector a -> Vectors aSource
Construct a Vectors
containing data from a single unboxed array.
unsafeIndex :: (Unboxes a, Unbox a) => Vectors a -> Int -> Vector aSource
Take one of the outer vectors from a Vectors
.
unsafeIndex2 :: Unboxes a => Vectors a -> Int -> Int -> aSource
Retrieve a single element from a Vectors
,
given the outer and inner indices.
unsafeIndexUnpack :: Unboxes a => Vectors a -> Int -> (ByteArray, Int, Int)Source
Retrieve an inner array from a Vectors
, returning the array data,
starting index in the data, and vector length.
append :: (Unboxes a, Unbox a) => Vectors a -> Vectors a -> Vectors aSource
Appending two Vectors
uses work proportional to
the length of the outer arrays.