Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Array.Nested.Ranked.Base
Synopsis
- newtype Ranked (n :: Nat) a = Ranked (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)
- liftRanked1 :: forall (n :: Natural) a b. (Mixed (Replicate n ('Nothing :: Maybe Nat)) a -> Mixed (Replicate n ('Nothing :: Maybe Nat)) b) -> Ranked n a -> Ranked n b
- liftRanked2 :: forall (n :: Natural) a b c. (Mixed (Replicate n ('Nothing :: Maybe Nat)) a -> Mixed (Replicate n ('Nothing :: Maybe Nat)) b -> Mixed (Replicate n ('Nothing :: Maybe Nat)) c) -> Ranked n a -> Ranked n b -> Ranked n c
- rquotArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a
- rremArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a
- ratan2Array :: forall a (n :: Nat). (FloatElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a
- rshape :: forall a (n :: Nat). Elt a => Ranked n a -> IShR n
- rrank :: forall a (n :: Nat). Elt a => Ranked n a -> SNat n
- shrFromShX :: forall (sh :: [Maybe Nat]). IShX sh -> IShR (Rank sh)
- shrFromShX2 :: forall (n :: Natural). IShX (Replicate n ('Nothing :: Maybe Nat)) -> IShR n
Documentation
newtype Ranked (n :: Nat) a Source #
A rank-typed array: the number of dimensions of the array (its rank) is
represented on the type level as a Nat
.
Valid elements of a ranked arrays are described by the Elt
type class.
Because Ranked
itself is also an instance of Elt
, nested arrays are
supported (and are represented as a single, flattened, struct-of-arrays
array internally).
Instances
liftRanked1 :: forall (n :: Natural) a b. (Mixed (Replicate n ('Nothing :: Maybe Nat)) a -> Mixed (Replicate n ('Nothing :: Maybe Nat)) b) -> Ranked n a -> Ranked n b Source #
liftRanked2 :: forall (n :: Natural) a b c. (Mixed (Replicate n ('Nothing :: Maybe Nat)) a -> Mixed (Replicate n ('Nothing :: Maybe Nat)) b -> Mixed (Replicate n ('Nothing :: Maybe Nat)) c) -> Ranked n a -> Ranked n b -> Ranked n c Source #
rquotArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #
rremArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #
ratan2Array :: forall a (n :: Nat). (FloatElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #
shrFromShX2 :: forall (n :: Natural). IShX (Replicate n ('Nothing :: Maybe Nat)) -> IShR n Source #
Convenience wrapper around shrFromShX
that applies lemRankReplicate
.