comfort-array-0.4: Arrays where the index type is a function of the shape type

Safe HaskellNone
LanguageHaskell98

Data.Array.Comfort.Storable.Unchecked

Description

The functions in this module miss any bound checking.

Documentation

data Array sh a Source #

Constructors

Array 

Fields

Instances
(C sh, Eq sh, Storable a, Eq a) => Eq (Array sh a) Source # 
Instance details

Defined in Data.Array.Comfort.Storable.Private

Methods

(==) :: Array sh a -> Array sh a -> Bool #

(/=) :: Array sh a -> Array sh a -> Bool #

(C sh, Show sh, Storable a, Show a) => Show (Array sh a) Source # 
Instance details

Defined in Data.Array.Comfort.Storable.Private

Methods

showsPrec :: Int -> Array sh a -> ShowS #

show :: Array sh a -> String #

showList :: [Array sh a] -> ShowS #

NFData sh => NFData (Array sh a) Source # 
Instance details

Defined in Data.Array.Comfort.Storable.Private

Methods

rnf :: Array sh a -> () #

reshape :: sh1 -> Array sh0 a -> Array sh1 a Source #

mapShape :: (sh0 -> sh1) -> Array sh0 a -> Array sh1 a Source #

(!) :: (Indexed sh, Storable a) => Array sh a -> Index sh -> a infixl 9 Source #

unsafeCreate :: (C sh, Storable a) => sh -> (Ptr a -> IO ()) -> Array sh a Source #

unsafeCreateWithSize :: (C sh, Storable a) => sh -> (Int -> Ptr a -> IO ()) -> Array sh a Source #

unsafeCreateWithSizeAndResult :: (C sh, Storable a) => sh -> (Int -> Ptr a -> IO b) -> (Array sh a, b) Source #

toList :: (C sh, Storable a) => Array sh a -> [a] Source #

fromList :: (C sh, Storable a) => sh -> [a] -> Array sh a Source #

map :: (C sh, Storable a, Storable b) => (a -> b) -> Array sh a -> Array sh b Source #

mapWithIndex :: (Indexed sh, Index sh ~ ix, Storable a, Storable b) => (ix -> a -> b) -> Array sh a -> Array sh b Source #

zipWith :: (C sh, Storable a, Storable b, Storable c) => (a -> b -> c) -> Array sh a -> Array sh b -> Array sh c Source #

(//) :: (Indexed sh, Storable a) => Array sh a -> [(Index sh, a)] -> Array sh a Source #

accumulate :: (Indexed sh, Storable a) => (a -> b -> a) -> Array sh a -> [(Index sh, b)] -> Array sh a Source #

fromAssociations :: (Indexed sh, Storable a) => a -> sh -> [(Index sh, a)] -> Array sh a Source #

singleton :: Storable a => a -> Array () a Source #

append :: (C shx, C shy, Storable a) => Array shx a -> Array shy a -> Array (shx :+: shy) a Source #

take :: (Integral n, Storable a) => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a Source #

drop :: (Integral n, Storable a) => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a Source #

takeLeft :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> Array sh0 a Source #

takeRight :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> Array sh1 a Source #

split :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> (Array sh0 a, Array sh1 a) Source #

sum :: (C sh, Storable a, Num a) => Array sh a -> a Source #

product :: (C sh, Storable a, Num a) => Array sh a -> a Source #

foldl :: (C sh, Storable a) => (b -> a -> b) -> b -> Array sh a -> b Source #