Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- data Array sh a = Array {}
- reshape :: sh1 -> Array sh0 a -> Array sh1 a
- mapShape :: (sh0 -> sh1) -> Array sh0 a -> Array sh1 a
- (!) :: Indexed sh => Array sh a -> Index sh -> a
- toList :: C sh => Array sh a -> [a]
- fromList :: C sh => sh -> [a] -> Array sh a
- vectorFromList :: [a] -> Array (ZeroBased Int) a
- replicate :: C sh => sh -> a -> Array sh a
- map :: C sh => (a -> b) -> Array sh a -> Array sh b
- zipWith :: C sh => (a -> b -> c) -> Array sh a -> Array sh b -> Array sh c
- append :: (C shx, C shy) => Array shx a -> Array shy a -> Array (shx ::+ shy) a
- take :: Integral n => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a
- drop :: Integral n => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a
- takeLeft :: (C sh0, C sh1) => Array (sh0 ::+ sh1) a -> Array sh0 a
- takeRight :: (C sh0, C sh1) => Array (sh0 ::+ sh1) a -> Array sh1 a
- split :: (C sh0, C sh1) => Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
- takeCenter :: (C sh0, C sh1, C sh2) => Array (sh0 ::+ (sh1 ::+ sh2)) a -> Array sh1 a
Documentation
Instances
C sh => Foldable (Array sh) Source # | |
Defined in Data.Array.Comfort.Boxed.Unchecked fold :: Monoid m => Array sh m -> m # foldMap :: Monoid m => (a -> m) -> Array sh a -> m # foldMap' :: Monoid m => (a -> m) -> Array sh a -> m # foldr :: (a -> b -> b) -> b -> Array sh a -> b # foldr' :: (a -> b -> b) -> b -> Array sh a -> b # foldl :: (b -> a -> b) -> b -> Array sh a -> b # foldl' :: (b -> a -> b) -> b -> Array sh a -> b # foldr1 :: (a -> a -> a) -> Array sh a -> a # foldl1 :: (a -> a -> a) -> Array sh a -> a # elem :: Eq a => a -> Array sh a -> Bool # maximum :: Ord a => Array sh a -> a # minimum :: Ord a => Array sh a -> a # | |
C sh => Traversable (Array sh) Source # | |
Defined in Data.Array.Comfort.Boxed.Unchecked | |
Static sh => Applicative (Array sh) Source # | We must restrict |
C sh => Functor (Array sh) Source # | |
(C sh, Show sh, Show a) => Show (Array sh a) Source # | |
(C sh, NFData sh, NFData a) => NFData (Array sh a) Source # | |
Defined in Data.Array.Comfort.Boxed.Unchecked | |
(Eq sh, Eq a) => Eq (Array sh a) Source # | |
take :: Integral n => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a Source #
\(QC.NonNegative n) (ArrayChar x) -> x == Array.mapShape (Shape.ZeroBased . Shape.size) (Array.append (Array.take n x) (Array.drop n x))
drop :: Integral n => n -> Array (ZeroBased n) a -> Array (ZeroBased n) a Source #
\(QC.NonNegative n) (ArrayChar x) -> x == Array.mapShape (Shape.ZeroBased . Shape.size) (Array.append (Array.take n x) (Array.drop n x))