License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Simple Array and Almost-Array-like data structure
Generally accessible in o(1)
- data Array a
- data MArray a st
- data UArray ty
- data MUArray ty st
- data ChunkedUArray ty
- data Bitmap
- data MutableBitmap st
- class Eq ty => PrimType ty
- data OutOfBound
Documentation
Array of a
Mutable Array of a
An array of type built on top of GHC primitive.
The elements need to have fixed sized and the representation is a packed contiguous array in memory that can easily be passed to foreign interface
PrimType ty => IsList (UArray ty) # | |
(PrimType ty, Eq ty) => Eq (UArray ty) # | |
Data ty => Data (UArray ty) # | |
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UArray ty -> c (UArray ty) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UArray ty) # toConstr :: UArray ty -> Constr # dataTypeOf :: UArray ty -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (UArray ty)) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UArray ty)) # gmapT :: (forall b. Data b => b -> b) -> UArray ty -> UArray ty # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r # gmapQ :: (forall d. Data d => d -> u) -> UArray ty -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UArray ty -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) # | |
(PrimType ty, Ord ty) => Ord (UArray ty) # | |
(PrimType ty, Show ty) => Show (UArray ty) # | |
PrimType ty => Monoid (UArray ty) # | |
PrimType ty => Copy (UArray ty) # | |
PrimType ty => Buildable (UArray ty) # | |
PrimType ty => Collection (UArray ty) # | |
elem :: (Eq a, (* ~ a) (Element (UArray ty))) => Element (UArray ty) -> UArray ty -> Bool # notElem :: (Eq a, (* ~ a) (Element (UArray ty))) => Element (UArray ty) -> UArray ty -> Bool # maximum :: (Ord a, (* ~ a) (Element (UArray ty))) => NonEmpty (UArray ty) -> Element (UArray ty) # minimum :: (Ord a, (* ~ a) (Element (UArray ty))) => NonEmpty (UArray ty) -> Element (UArray ty) # | |
PrimType ty => Foldable (UArray ty) # | |
PrimType ty => IndexedCollection (UArray ty) # | |
PrimType ty => InnerFunctor (UArray ty) # | |
PrimType ty => Sequential (UArray ty) # | |
take :: Int -> UArray ty -> UArray ty # revTake :: Int -> UArray ty -> UArray ty # drop :: Int -> UArray ty -> UArray ty # revDrop :: Int -> UArray ty -> UArray ty # splitAt :: Int -> UArray ty -> (UArray ty, UArray ty) # revSplitAt :: Int -> UArray ty -> (UArray ty, UArray ty) # splitOn :: (Element (UArray ty) -> Bool) -> UArray ty -> [UArray ty] # break :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # breakElem :: Element (UArray ty) -> UArray ty -> (UArray ty, UArray ty) # intersperse :: Element (UArray ty) -> UArray ty -> UArray ty # intercalate :: Element (UArray ty) -> UArray ty -> Element (UArray ty) # span :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # filter :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty # partition :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) # reverse :: UArray ty -> UArray ty # uncons :: UArray ty -> Maybe (Element (UArray ty), UArray ty) # unsnoc :: UArray ty -> Maybe (UArray ty, Element (UArray ty)) # snoc :: UArray ty -> Element (UArray ty) -> UArray ty # cons :: Element (UArray ty) -> UArray ty -> UArray ty # find :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Element (UArray ty)) # sortBy :: (Element (UArray ty) -> Element (UArray ty) -> Ordering) -> UArray ty -> UArray ty # singleton :: Element (UArray ty) -> UArray ty # head :: NonEmpty (UArray ty) -> Element (UArray ty) # last :: NonEmpty (UArray ty) -> Element (UArray ty) # tail :: NonEmpty (UArray ty) -> UArray ty # init :: NonEmpty (UArray ty) -> UArray ty # isPrefixOf :: UArray ty -> UArray ty -> Bool # isSuffixOf :: UArray ty -> UArray ty -> Bool # | |
PrimType ty => Zippable (UArray ty) # | |
zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (UArray ty)) -> a -> b -> UArray ty # zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (UArray ty)) -> a -> b -> c -> UArray ty # zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (UArray ty)) -> a -> b -> c -> d -> UArray ty # zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (UArray ty)) -> a -> b -> c -> d -> e -> UArray ty # zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> UArray ty # zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> g -> UArray ty # | |
PrimType a => Hashable (UArray a) # | |
type Item (UArray ty) # | |
type Element (UArray ty) # | |
type Mutable (UArray ty) # | |
type Step (UArray ty) # | |
A Mutable array of types built on top of GHC primitive.
Element in this array can be modified in place.
data ChunkedUArray ty #
data MutableBitmap st #
Represent the accessor for types that can be stored in the UArray and MUArray.
Types need to be a instance of storable and have fixed sized.
primSizeInBytes, primBaUIndex, primMbaURead, primMbaUWrite, primAddrIndex, primAddrRead, primAddrWrite
data OutOfBound #
Exception during an operation accessing the vector out of bound
Represent the type of operation, the index accessed, and the total length of the vector.
Show OutOfBound # | |
showsPrec :: Int -> OutOfBound -> ShowS # show :: OutOfBound -> String # showList :: [OutOfBound] -> ShowS # | |
Exception OutOfBound # | |
toException :: OutOfBound -> SomeException # fromException :: SomeException -> Maybe OutOfBound # displayException :: OutOfBound -> String # |