Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
Layout an array as flat vector of boxed elements.
UNSAFE: Indexing into raw material arrays is not bounds checked. You may want to wrap this with a Checked layout as well.
Boxed | |
|
Eq B | |
Show B | |
Layout B | Boxed arrays. |
Bulk B a | Boxed arrays. |
Windowable B a | Boxed windows. |
Target B a | Boxed buffers. |
Eq (Name B) | |
Show (Name B) | |
Eq a => Eq (Array B a) | |
Show a => Show (Array B a) | |
Unpack (Buffer B a) (IOVector a) | |
data Name B = B | |
type Index B = Int | |
data Array B = BArray !(Vector a) | |
data Buffer B = BBuffer !(IOVector a) |
Conversions
Utils
decimate :: (a -> a -> Bool) -> Array B a -> Array B a Source
Scan through an array from front to back. For pairs of successive elements, drop the second one when the given predicate returns true.
This function can be used to remove duplicates from a sorted array.
TODO: generalise to other array types.