Copyright | (c) Alexey Kuleshevich 2018-2022 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data L = L
- data family Array r ix e :: Type
- newtype List ix e = List {
- unList :: [Elt ix e]
- toListArray :: (Ragged L ix e, Shape r ix, Source r e) => Array r ix e -> Array L ix e
- showsArrayPrec :: forall r r' ix e. (Ragged L ix e, Load r ix e, Load r' ix e, Source r' e, Show e) => (Array r ix e -> Array r' ix e) -> Int -> Array r ix e -> ShowS
- showArrayList :: Show arr => [arr] -> String -> String
- type family ListItem ix e :: Type where ...
Documentation
Instances
data family Array r ix e :: Type Source #
The array family. Representations r
describe how data is arranged or computed. All
arrays have a common property that each index ix
always maps to the same unique
element e
, even if that element does not yet exist in memory and the array has to be
computed in order to get the value of that element. Data is always arranged in a nested
row-major fashion. Rank of an array is specified by
.Dimensions
ix
Since: 0.1.0
Instances
Index ix => Foldable (Array DI ix) Source # | |
Defined in Data.Massiv.Array.Delayed.Interleaved fold :: Monoid m => Array DI ix m -> m # foldMap :: Monoid m => (a -> m) -> Array DI ix a -> m # foldMap' :: Monoid m => (a -> m) -> Array DI ix a -> m # foldr :: (a -> b -> b) -> b -> Array DI ix a -> b # foldr' :: (a -> b -> b) -> b -> Array DI ix a -> b # foldl :: (b -> a -> b) -> b -> Array DI ix a -> b # foldl' :: (b -> a -> b) -> b -> Array DI ix a -> b # foldr1 :: (a -> a -> a) -> Array DI ix a -> a # foldl1 :: (a -> a -> a) -> Array DI ix a -> a # toList :: Array DI ix a -> [a] # null :: Array DI ix a -> Bool # length :: Array DI ix a -> Int # elem :: Eq a => a -> Array DI ix a -> Bool # maximum :: Ord a => Array DI ix a -> a # minimum :: Ord a => Array DI ix a -> a # | |
Index ix => Foldable (Array D ix) Source # | Row-major sequential folding over a Delayed array. |
Defined in Data.Massiv.Array.Delayed.Pull fold :: Monoid m => Array D ix m -> m # foldMap :: Monoid m => (a -> m) -> Array D ix a -> m # foldMap' :: Monoid m => (a -> m) -> Array D ix a -> m # foldr :: (a -> b -> b) -> b -> Array D ix a -> b # foldr' :: (a -> b -> b) -> b -> Array D ix a -> b # foldl :: (b -> a -> b) -> b -> Array D ix a -> b # foldl' :: (b -> a -> b) -> b -> Array D ix a -> b # foldr1 :: (a -> a -> a) -> Array D ix a -> a # foldl1 :: (a -> a -> a) -> Array D ix a -> a # toList :: Array D ix a -> [a] # null :: Array D ix a -> Bool # length :: Array D ix a -> Int # elem :: Eq a => a -> Array D ix a -> Bool # maximum :: Ord a => Array D ix a -> a # minimum :: Ord a => Array D ix a -> a # | |
Foldable (Array DS Ix1) Source # | |
Defined in Data.Massiv.Array.Delayed.Stream fold :: Monoid m => Array DS Ix1 m -> m # foldMap :: Monoid m => (a -> m) -> Array DS Ix1 a -> m # foldMap' :: Monoid m => (a -> m) -> Array DS Ix1 a -> m # foldr :: (a -> b -> b) -> b -> Array DS Ix1 a -> b # foldr' :: (a -> b -> b) -> b -> Array DS Ix1 a -> b # foldl :: (b -> a -> b) -> b -> Array DS Ix1 a -> b # foldl' :: (b -> a -> b) -> b -> Array DS Ix1 a -> b # foldr1 :: (a -> a -> a) -> Array DS Ix1 a -> a # foldl1 :: (a -> a -> a) -> Array DS Ix1 a -> a # toList :: Array DS Ix1 a -> [a] # null :: Array DS Ix1 a -> Bool # length :: Array DS Ix1 a -> Int # elem :: Eq a => a -> Array DS Ix1 a -> Bool # maximum :: Ord a => Array DS Ix1 a -> a # minimum :: Ord a => Array DS Ix1 a -> a # | |
Index ix => Foldable (Array B ix) Source # | Row-major sequential folding over a Boxed array. |
Defined in Data.Massiv.Array.Manifest.Boxed fold :: Monoid m => Array B ix m -> m # foldMap :: Monoid m => (a -> m) -> Array B ix a -> m # foldMap' :: Monoid m => (a -> m) -> Array B ix a -> m # foldr :: (a -> b -> b) -> b -> Array B ix a -> b # foldr' :: (a -> b -> b) -> b -> Array B ix a -> b # foldl :: (b -> a -> b) -> b -> Array B ix a -> b # foldl' :: (b -> a -> b) -> b -> Array B ix a -> b # foldr1 :: (a -> a -> a) -> Array B ix a -> a # foldl1 :: (a -> a -> a) -> Array B ix a -> a # toList :: Array B ix a -> [a] # null :: Array B ix a -> Bool # length :: Array B ix a -> Int # elem :: Eq a => a -> Array B ix a -> Bool # maximum :: Ord a => Array B ix a -> a # minimum :: Ord a => Array B ix a -> a # | |
Index ix => Foldable (Array BL ix) Source # | Row-major sequential folding over a Boxed array. |
Defined in Data.Massiv.Array.Manifest.Boxed fold :: Monoid m => Array BL ix m -> m # foldMap :: Monoid m => (a -> m) -> Array BL ix a -> m # foldMap' :: Monoid m => (a -> m) -> Array BL ix a -> m # foldr :: (a -> b -> b) -> b -> Array BL ix a -> b # foldr' :: (a -> b -> b) -> b -> Array BL ix a -> b # foldl :: (b -> a -> b) -> b -> Array BL ix a -> b # foldl' :: (b -> a -> b) -> b -> Array BL ix a -> b # foldr1 :: (a -> a -> a) -> Array BL ix a -> a # foldl1 :: (a -> a -> a) -> Array BL ix a -> a # toList :: Array BL ix a -> [a] # null :: Array BL ix a -> Bool # length :: Array BL ix a -> Int # elem :: Eq a => a -> Array BL ix a -> Bool # maximum :: Ord a => Array BL ix a -> a # minimum :: Ord a => Array BL ix a -> a # | |
Index ix => Traversable (Array B ix) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
Index ix => Traversable (Array BL ix) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
Index ix => Applicative (Array DI ix) Source # | |
Defined in Data.Massiv.Array.Delayed.Interleaved | |
Index ix => Applicative (Array D ix) Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
Applicative (Array DS Ix1) Source # | |
Defined in Data.Massiv.Array.Delayed.Stream | |
Functor (Array DI ix) Source # | |
Functor (Array D ix) Source # | |
Index ix => Functor (Array DL ix) Source # | |
Functor (Array DS Ix1) Source # | |
Functor (Array DW ix) Source # | |
Index ix => Functor (Array B ix) Source # | |
Index ix => Functor (Array BL ix) Source # | |
Monad (Array DS Ix1) Source # | |
Monoid (Array DL Ix1 e) Source # | |
Monoid (Array DS Ix1 e) Source # | |
Semigroup (Array DL Ix1 e) Source # | |
Semigroup (Array DS Ix1 e) Source # | |
IsList (Array DS Ix1 e) Source # | |
(IsList (Array L ix e), Ragged L ix e) => IsList (Array B ix e) Source # | |
(IsList (Array L ix e), Ragged L ix e) => IsList (Array BL ix e) Source # | |
(NFData e, IsList (Array L ix e), Ragged L ix e) => IsList (Array BN ix e) Source # | |
(Prim e, IsList (Array L ix e), Ragged L ix e) => IsList (Array P ix e) Source # | |
(Storable e, IsList (Array L ix e), Ragged L ix e) => IsList (Array S ix e) Source # | |
(Unbox e, IsList (Array L ix e), Ragged L ix e) => IsList (Array U ix e) Source # | |
Coercible (Elt ix e) (ListItem ix e) => IsList (Array L ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array DI ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array D ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array DL ix e) Source # | |
Show e => Show (Array DS Ix1 e) Source # | |
(Ragged L ix e, Load DW ix e, Show e) => Show (Array DW ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array B ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array BL ix e) Source # | |
(Ragged L ix e, Show e, NFData e) => Show (Array BN ix e) Source # | |
(Ragged L ix e, Show e, Prim e) => Show (Array P ix e) Source # | |
(Ragged L ix e, Show e, Storable e) => Show (Array S ix e) Source # | |
(Ragged L ix e, Show e, Unbox e) => Show (Array U ix e) Source # | |
(Ragged L ix e, Show e) => Show (Array L ix e) Source # | |
(Index ix, NFData e) => NFData (Array B ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
(Index ix, NFData e) => NFData (Array BL ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
NFData (Array BN ix e) Source # | O(1) - |
Defined in Data.Massiv.Array.Manifest.Boxed | |
Index ix => NFData (Array P ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
NFData ix => NFData (Array S ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
NFData ix => NFData (Array U ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
(Index ix, Eq e) => Eq (Array DI ix e) Source # | |
(Eq e, Index ix) => Eq (Array D ix e) Source # | |
(Index ix, Eq e) => Eq (Array B ix e) Source # | |
(Index ix, Eq e) => Eq (Array BL ix e) Source # | |
(Index ix, NFData e, Eq e) => Eq (Array BN ix e) Source # | |
(Prim e, Eq e, Index ix) => Eq (Array P ix e) Source # | |
(Storable e, Eq e, Index ix) => Eq (Array S ix e) Source # | |
(Unbox e, Eq e, Index ix) => Eq (Array U ix e) Source # | |
(Index ix, Ord e) => Ord (Array DI ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Interleaved compare :: Array DI ix e -> Array DI ix e -> Ordering # (<) :: Array DI ix e -> Array DI ix e -> Bool # (<=) :: Array DI ix e -> Array DI ix e -> Bool # (>) :: Array DI ix e -> Array DI ix e -> Bool # (>=) :: Array DI ix e -> Array DI ix e -> Bool # | |
(Ord e, Index ix) => Ord (Array D ix e) Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
(Index ix, Ord e) => Ord (Array B ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed | |
(Index ix, Ord e) => Ord (Array BL ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed compare :: Array BL ix e -> Array BL ix e -> Ordering # (<) :: Array BL ix e -> Array BL ix e -> Bool # (<=) :: Array BL ix e -> Array BL ix e -> Bool # (>) :: Array BL ix e -> Array BL ix e -> Bool # (>=) :: Array BL ix e -> Array BL ix e -> Bool # | |
(Index ix, NFData e, Ord e) => Ord (Array BN ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Boxed compare :: Array BN ix e -> Array BN ix e -> Ordering # (<) :: Array BN ix e -> Array BN ix e -> Bool # (<=) :: Array BN ix e -> Array BN ix e -> Bool # (>) :: Array BN ix e -> Array BN ix e -> Bool # (>=) :: Array BN ix e -> Array BN ix e -> Bool # | |
(Prim e, Ord e, Index ix) => Ord (Array P ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Primitive | |
(Storable e, Ord e, Index ix) => Ord (Array S ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
(Unbox e, Ord e, Index ix) => Ord (Array U ix e) Source # | |
Defined in Data.Massiv.Array.Manifest.Unboxed | |
newtype Array DI ix e Source # | |
data Array D ix e Source # | |
Defined in Data.Massiv.Array.Delayed.Pull | |
data Array DL ix e Source # | |
data Array DW ix e Source # | |
newtype Array B ix e Source # | |
data Array BL ix e Source # | |
newtype Array BN ix e Source # | |
data Array P ix e Source # | |
data Array S ix e Source # | |
Defined in Data.Massiv.Array.Manifest.Storable | |
data Array U ix e Source # | |
data Array L ix e Source # | |
newtype Array DS Ix1 e Source # | |
type Item (Array DS Ix1 e) Source # | |
Defined in Data.Massiv.Array.Delayed.Stream | |
type Item (Array B ix e) Source # | |
type Item (Array BL ix e) Source # | |
type Item (Array BN ix e) Source # | |
type Item (Array P ix e) Source # | |
type Item (Array S ix e) Source # | |
type Item (Array U ix e) Source # | |
type Item (Array L ix e) Source # | |
Defined in Data.Massiv.Core.List |
toListArray :: (Ragged L ix e, Shape r ix, Source r e) => Array r ix e -> Array L ix e Source #
Construct an array backed by linked lists from any source array
Since: 0.4.0
:: forall r r' ix e. (Ragged L ix e, Load r ix e, Load r' ix e, Source r' e, Show e) | |
=> (Array r ix e -> Array r' ix e) | Modifier |
-> Int | |
-> Array r ix e | |
-> ShowS |
Helper function for declaring Show
instances for arrays
Since: 0.4.0