Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Array sh a
- shape :: Array sh a -> sh
- reshape :: (C sh0, C sh1) => sh1 -> Array sh0 a -> Array sh1 a
- mapShape :: (C sh0, C sh1) => (sh0 -> sh1) -> Array sh0 a -> Array sh1 a
- (!) :: (Indexed sh, Storable a) => Array sh a -> Index sh -> a
- toList :: (C sh, Storable a) => Array sh a -> [a]
- vectorFromList :: Storable a => [a] -> Array (ZeroBased Int) a
- toAssociations :: (Indexed sh, Storable a) => Array sh a -> [(Index sh, a)]
- fromList :: (C sh, Storable a) => sh -> [a] -> Array sh a
- fromMap :: (Ord k, Storable a) => Map k a -> Array (Set k) a
- fromContainer :: (C f, Storable a) => f a -> Array (Shape f) a
- toContainer :: (C f, Storable a) => Array (Shape f) a -> f a
- sample :: (Indexed sh, Storable a) => sh -> (Index sh -> a) -> Array sh a
- fromBoxed :: (C sh, Storable a) => Array sh a -> Array sh a
- toBoxed :: (C sh, Storable a) => Array sh a -> Array sh a
- map :: (C sh, Storable a, Storable b) => (a -> b) -> Array sh a -> Array sh b
- mapWithIndex :: (Indexed sh, Index sh ~ ix, Storable a, Storable b) => (ix -> a -> b) -> Array sh a -> Array sh b
- zipWith :: (C sh, Eq sh, Storable a, Storable b, Storable c) => (a -> b -> c) -> Array sh a -> Array sh b -> Array sh c
- (//) :: (Indexed sh, Storable a) => Array sh a -> [(Index sh, a)] -> Array sh a
- accumulate :: (Indexed sh, Storable a) => (a -> b -> a) -> Array sh a -> [(Index sh, b)] -> Array sh a
- fromAssociations :: (Indexed sh, Storable a) => a -> sh -> [(Index sh, a)] -> Array sh a
- singleton :: Storable a => a -> Array () a
- append :: (C shx, C shy, Storable a) => Array shx a -> Array shy a -> Array (shx :+: shy) a
- take :: (Integral n, Storable a) => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a
- drop :: (Integral n, Storable a) => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a
- takeLeft :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> Array sh0 a
- takeRight :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> Array sh1 a
- split :: (C sh0, C sh1, Storable a) => Array (sh0 :+: sh1) a -> (Array sh0 a, Array sh1 a)
- sum :: (C sh, Storable a, Num a) => Array sh a -> a
- product :: (C sh, Storable a, Num a) => Array sh a -> a
- minimum :: (C sh, Storable a, Ord a) => Array sh a -> a
- argMinimum :: (InvIndexed sh, Index sh ~ ix, Storable a, Ord a) => Array sh a -> (ix, a)
- maximum :: (C sh, Storable a, Ord a) => Array sh a -> a
- argMaximum :: (InvIndexed sh, Index sh ~ ix, Storable a, Ord a) => Array sh a -> (ix, a)
- limits :: (C sh, Storable a, Ord a) => Array sh a -> (a, a)
- foldl :: (C sh, Storable a) => (b -> a -> b) -> b -> Array sh a -> b
- foldl1 :: (C sh, Storable a) => (a -> a -> a) -> Array sh a -> a
- foldMap :: (C sh, Storable a, Ord a, Semigroup m) => (a -> m) -> Array sh a -> m
Documentation
mapWithIndex :: (Indexed sh, Index sh ~ ix, Storable a, Storable b) => (ix -> a -> b) -> Array sh a -> Array sh b Source #
zipWith :: (C sh, Eq sh, Storable a, Storable b, Storable c) => (a -> b -> c) -> Array sh a -> Array sh b -> Array sh c Source #
accumulate :: (Indexed sh, Storable a) => (a -> b -> a) -> Array sh a -> [(Index sh, b)] -> Array sh a Source #
append :: (C shx, C shy, Storable a) => Array shx a -> Array shy a -> Array (shx :+: shy) a Source #
minimum :: (C sh, Storable a, Ord a) => Array sh a -> a Source #
It is a checked error if the vector is empty.
argMinimum :: (InvIndexed sh, Index sh ~ ix, Storable a, Ord a) => Array sh a -> (ix, a) Source #
maximum :: (C sh, Storable a, Ord a) => Array sh a -> a Source #
It is a checked error if the vector is empty.
argMaximum :: (InvIndexed sh, Index sh ~ ix, Storable a, Ord a) => Array sh a -> (ix, a) Source #