easytensor-2.1.1.1: Pure, type-indexed haskell vector, matrix, and tensor library.
Safe HaskellNone
LanguageHaskell2010

Numeric.DataFrame.Type

Description

The core easytensor types.

Synopsis

Data types

data SomeDataFrame (t :: l) Source #

Data frame that has an unknown dimensionality at compile time. Pattern-match against its constructor to get a Nat-indexed data frame

Constructors

forall (ns :: [Nat]).(Dimensions ns, KnownBackends t ns) => SomeDataFrame (DataFrame t ns) 

Instances

Instances details
All Eq ts => Eq (SomeDataFrame ts) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Eq t => Eq (SomeDataFrame t) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(All Read ts, All PrimBytes ts, RepresentableList ts) => Read (SomeDataFrame ts) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Read t, PrimBytes t) => Read (SomeDataFrame t) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(All Show ts, All PrimBytes ts) => Show (SomeDataFrame ts) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Show t, PrimBytes t) => Show (SomeDataFrame t) Source # 
Instance details

Defined in Numeric.DataFrame.Type

data DataFrame' (xs :: [k]) (t :: l) Source #

DataFrame with its type arguments swapped.

Instances

Instances details
(Data (DataFrame t xs), Typeable t, Typeable xs, Typeable k, Typeable l) => Data (DataFrame' xs t) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFrame' xs t -> c (DataFrame' xs t) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFrame' xs t) #

toConstr :: DataFrame' xs t -> Constr #

dataTypeOf :: DataFrame' xs t -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (DataFrame' xs t)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (DataFrame' xs t)) #

gmapT :: (forall b. Data b => b -> b) -> DataFrame' xs t -> DataFrame' xs t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame' xs t -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame' xs t -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataFrame' xs t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFrame' xs t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFrame' xs t -> m (DataFrame' xs t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame' xs t -> m (DataFrame' xs t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame' xs t -> m (DataFrame' xs t) #

data family DataFrame (t :: l) (xs :: [k]) Source #

Keep data in a primitive data frame and maintain information about Dimensions in the type system

Instances

Instances details
(Dimensions xns, KnownBackend t (DimsBound xns), PrimArray t (DataFrame t (DimsBound xns)), PrimBytes t) => PrimArray t (DataFrame t xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t xns Source #

ix# :: Int# -> DataFrame t xns -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t xns #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t xns -> DataFrame t xns Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t xns -> r Source #

offsetElems :: DataFrame t xns -> Int# Source #

uniqueOrCumulDims :: DataFrame t xns -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t xns Source #

(PrimArray t (DFBackend t ds), PrimBytes t) => PrimArray t (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t ds Source #

ix# :: Int# -> DataFrame t ds -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t ds #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t ds -> DataFrame t ds Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t ds -> r Source #

offsetElems :: DataFrame t ds -> Int# Source #

uniqueOrCumulDims :: DataFrame t ds -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t ds Source #

Ord (ProductOrd (DFBackend t ds)) => Ord (ProductOrd (DataFrame t ds)) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Ord (ProductOrd (DFBackend t ds)), Eq (DFBackend t ds)) => Ord (ProductOrd (DataFrame t ds)) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Bounded (DFBackend t ds) => Bounded (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

minBound :: DataFrame t ds #

maxBound :: DataFrame t ds #

(Dimensions xns, KnownBackends ts (DimsBound xns), Bounded (DataFrame ts (DimsBound xns))) => Bounded (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

minBound :: DataFrame ts xns #

maxBound :: DataFrame ts xns #

Enum (DFBackend t ds) => Enum (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

succ :: DataFrame t ds -> DataFrame t ds #

pred :: DataFrame t ds -> DataFrame t ds #

toEnum :: Int -> DataFrame t ds #

fromEnum :: DataFrame t ds -> Int #

enumFrom :: DataFrame t ds -> [DataFrame t ds] #

enumFromThen :: DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

enumFromTo :: DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

enumFromThenTo :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

(Enum (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat])) => Enum (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

succ :: DataFrame ts '[] -> DataFrame ts '[] #

pred :: DataFrame ts '[] -> DataFrame ts '[] #

toEnum :: Int -> DataFrame ts '[] #

fromEnum :: DataFrame ts '[] -> Int #

enumFrom :: DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromThen :: DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromTo :: DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromThenTo :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

AllFrames Eq ts ds => Eq (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(/=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

All Eq ts => Eq (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(/=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

Eq (DFBackend t ds) => Eq (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame t ds -> DataFrame t ds -> Bool #

(/=) :: DataFrame t ds -> DataFrame t ds -> Bool #

Eq t => Eq (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame t ds -> DataFrame t ds -> Bool #

(/=) :: DataFrame t ds -> DataFrame t ds -> Bool #

Floating (DFBackend t ds) => Floating (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

pi :: DataFrame t ds #

exp :: DataFrame t ds -> DataFrame t ds #

log :: DataFrame t ds -> DataFrame t ds #

sqrt :: DataFrame t ds -> DataFrame t ds #

(**) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

logBase :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

sin :: DataFrame t ds -> DataFrame t ds #

cos :: DataFrame t ds -> DataFrame t ds #

tan :: DataFrame t ds -> DataFrame t ds #

asin :: DataFrame t ds -> DataFrame t ds #

acos :: DataFrame t ds -> DataFrame t ds #

atan :: DataFrame t ds -> DataFrame t ds #

sinh :: DataFrame t ds -> DataFrame t ds #

cosh :: DataFrame t ds -> DataFrame t ds #

tanh :: DataFrame t ds -> DataFrame t ds #

asinh :: DataFrame t ds -> DataFrame t ds #

acosh :: DataFrame t ds -> DataFrame t ds #

atanh :: DataFrame t ds -> DataFrame t ds #

log1p :: DataFrame t ds -> DataFrame t ds #

expm1 :: DataFrame t ds -> DataFrame t ds #

log1pexp :: DataFrame t ds -> DataFrame t ds #

log1mexp :: DataFrame t ds -> DataFrame t ds #

(Dimensions xns, KnownBackends ts (DimsBound xns), Floating (DataFrame ts (DimsBound xns))) => Floating (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

pi :: DataFrame ts xns #

exp :: DataFrame ts xns -> DataFrame ts xns #

log :: DataFrame ts xns -> DataFrame ts xns #

sqrt :: DataFrame ts xns -> DataFrame ts xns #

(**) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

logBase :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

sin :: DataFrame ts xns -> DataFrame ts xns #

cos :: DataFrame ts xns -> DataFrame ts xns #

tan :: DataFrame ts xns -> DataFrame ts xns #

asin :: DataFrame ts xns -> DataFrame ts xns #

acos :: DataFrame ts xns -> DataFrame ts xns #

atan :: DataFrame ts xns -> DataFrame ts xns #

sinh :: DataFrame ts xns -> DataFrame ts xns #

cosh :: DataFrame ts xns -> DataFrame ts xns #

tanh :: DataFrame ts xns -> DataFrame ts xns #

asinh :: DataFrame ts xns -> DataFrame ts xns #

acosh :: DataFrame ts xns -> DataFrame ts xns #

atanh :: DataFrame ts xns -> DataFrame ts xns #

log1p :: DataFrame ts xns -> DataFrame ts xns #

expm1 :: DataFrame ts xns -> DataFrame ts xns #

log1pexp :: DataFrame ts xns -> DataFrame ts xns #

log1mexp :: DataFrame ts xns -> DataFrame ts xns #

Fractional (DFBackend t ds) => Fractional (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(/) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

recip :: DataFrame t ds -> DataFrame t ds #

fromRational :: Rational -> DataFrame t ds #

(Dimensions xns, KnownBackends ts (DimsBound xns), Fractional (DataFrame ts (DimsBound xns))) => Fractional (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(/) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

recip :: DataFrame ts xns -> DataFrame ts xns #

fromRational :: Rational -> DataFrame ts xns #

Integral (DFBackend t ds) => Integral (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

quot :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

rem :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

div :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

mod :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

quotRem :: DataFrame t ds -> DataFrame t ds -> (DataFrame t ds, DataFrame t ds) #

divMod :: DataFrame t ds -> DataFrame t ds -> (DataFrame t ds, DataFrame t ds) #

toInteger :: DataFrame t ds -> Integer #

(Integral (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Integral (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

quot :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

rem :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

div :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

mod :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

quotRem :: DataFrame ts '[] -> DataFrame ts '[] -> (DataFrame ts '[], DataFrame ts '[]) #

divMod :: DataFrame ts '[] -> DataFrame ts '[] -> (DataFrame ts '[], DataFrame ts '[]) #

toInteger :: DataFrame ts '[] -> Integer #

(AllFrames Data ts ds, Typeable ts, Typeable ds) => Data (DataFrame ts ds) Source #

Term-level structure of a MultiFrame ts is fully determined by its type Typeable ts. Thus, gunfold does not use its last argument (Constr) at all, relying on the structure of the type parameter.

Instance details

Defined in Numeric.DataFrame.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFrame ts ds -> c (DataFrame ts ds) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFrame ts ds) #

toConstr :: DataFrame ts ds -> Constr #

dataTypeOf :: DataFrame ts ds -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DataFrame ts ds)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DataFrame ts ds)) #

gmapT :: (forall b. Data b => b -> b) -> DataFrame ts ds -> DataFrame ts ds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame ts ds -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame ts ds -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataFrame ts ds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFrame ts ds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

(Data t, PrimBytes t, Typeable ds) => Data (DataFrame t ds) Source #

Term-level structure of a SingleFrame t ds is fully determined by its type dimensionality Typeable ds. Thus, gunfold does not use its last argument (Constr) at all, relying on the structure of the type parameter.

Instance details

Defined in Numeric.DataFrame.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFrame t ds -> c (DataFrame t ds) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFrame t ds) #

toConstr :: DataFrame t ds -> Constr #

dataTypeOf :: DataFrame t ds -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (DataFrame t ds)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (DataFrame t ds)) #

gmapT :: (forall b. Data b => b -> b) -> DataFrame t ds -> DataFrame t ds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame t ds -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame t ds -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataFrame t ds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFrame t ds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

Num (DFBackend t ds) => Num (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(+) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(-) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(*) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

negate :: DataFrame t ds -> DataFrame t ds #

abs :: DataFrame t ds -> DataFrame t ds #

signum :: DataFrame t ds -> DataFrame t ds #

fromInteger :: Integer -> DataFrame t ds #

(Dimensions xns, KnownBackends ts (DimsBound xns), Num (DataFrame ts (DimsBound xns))) => Num (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(+) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(-) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(*) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

negate :: DataFrame ts xns -> DataFrame ts xns #

abs :: DataFrame ts xns -> DataFrame ts xns #

signum :: DataFrame ts xns -> DataFrame ts xns #

fromInteger :: Integer -> DataFrame ts xns #

(AllFrames Eq ts ds, AllFrames Ord ts ds) => Ord (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame ts ds -> DataFrame ts ds -> Ordering #

(<) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(<=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(>) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(>=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

max :: DataFrame ts ds -> DataFrame ts ds -> DataFrame ts ds #

min :: DataFrame ts ds -> DataFrame ts ds -> DataFrame ts ds #

Ord (DFBackend t ds) => Ord (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame t ds -> DataFrame t ds -> Ordering #

(<) :: DataFrame t ds -> DataFrame t ds -> Bool #

(<=) :: DataFrame t ds -> DataFrame t ds -> Bool #

(>) :: DataFrame t ds -> DataFrame t ds -> Bool #

(>=) :: DataFrame t ds -> DataFrame t ds -> Bool #

max :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

min :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(xns ~ Map 'N (DimsBound xns), Eq (DataFrame ts xns), Ord (DataFrame ts (DimsBound xns))) => Ord (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame ts xns -> DataFrame ts xns -> Ordering #

(<) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(<=) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(>) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(>=) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

max :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

min :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(All Read ts, All PrimBytes ts, RepresentableList ts, Dimensions ds) => Read (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(All Read ts, All PrimBytes ts, RepresentableList ts, BoundedDims ds, All (KnownDimType :: XNat -> Constraint) ds) => Read (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Read t, PrimBytes t, Dimensions ds) => Read (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Read t, PrimBytes t, BoundedDims ds, All (KnownDimType :: XNat -> Constraint) ds) => Read (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Real (DFBackend t ds) => Real (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

toRational :: DataFrame t ds -> Rational #

(Real (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Real (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

toRational :: DataFrame ts '[] -> Rational #

RealFloat (DFBackend t ds) => RealFloat (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(RealFloat (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFloat (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

floatRadix :: DataFrame t '[] -> Integer #

floatDigits :: DataFrame t '[] -> Int #

floatRange :: DataFrame t '[] -> (Int, Int) #

decodeFloat :: DataFrame t '[] -> (Integer, Int) #

encodeFloat :: Integer -> Int -> DataFrame t '[] #

exponent :: DataFrame t '[] -> Int #

significand :: DataFrame t '[] -> DataFrame t '[] #

scaleFloat :: Int -> DataFrame t '[] -> DataFrame t '[] #

isNaN :: DataFrame t '[] -> Bool #

isInfinite :: DataFrame t '[] -> Bool #

isDenormalized :: DataFrame t '[] -> Bool #

isNegativeZero :: DataFrame t '[] -> Bool #

isIEEE :: DataFrame t '[] -> Bool #

atan2 :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] #

RealFrac (DFBackend t ds) => RealFrac (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

properFraction :: Integral b => DataFrame t ds -> (b, DataFrame t ds) #

truncate :: Integral b => DataFrame t ds -> b #

round :: Integral b => DataFrame t ds -> b #

ceiling :: Integral b => DataFrame t ds -> b #

floor :: Integral b => DataFrame t ds -> b #

(RealFrac (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFrac (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

properFraction :: Integral b => DataFrame t '[] -> (b, DataFrame t '[]) #

truncate :: Integral b => DataFrame t '[] -> b #

round :: Integral b => DataFrame t '[] -> b #

ceiling :: Integral b => DataFrame t '[] -> b #

floor :: Integral b => DataFrame t '[] -> b #

(All Show ts, All PrimBytes ts, Dimensions ds) => Show (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame ts ds -> ShowS #

show :: DataFrame ts ds -> String #

showList :: [DataFrame ts ds] -> ShowS #

(All Show ts, All PrimBytes ts) => Show (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame ts xns -> ShowS #

show :: DataFrame ts xns -> String #

showList :: [DataFrame ts xns] -> ShowS #

(Show t, PrimBytes t, Dimensions ds) => Show (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame t ds -> ShowS #

show :: DataFrame t ds -> String #

showList :: [DataFrame t ds] -> ShowS #

(Show t, PrimBytes t) => Show (DataFrame t xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame t xns -> ShowS #

show :: DataFrame t xns -> String #

showList :: [DataFrame t xns] -> ShowS #

Generic (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type Rep (DataFrame ts ds) :: Type -> Type #

Methods

from :: DataFrame ts ds -> Rep (DataFrame ts ds) x #

to :: Rep (DataFrame ts ds) x -> DataFrame ts ds #

(PrimBytes t, Dimensions ds) => Generic (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type Rep (DataFrame t ds) :: Type -> Type #

Methods

from :: DataFrame t ds -> Rep (DataFrame t ds) x #

to :: Rep (DataFrame t ds) x -> DataFrame t ds #

PrimBytes (DataFrame t ds) => Storable (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

sizeOf :: DataFrame t ds -> Int #

alignment :: DataFrame t ds -> Int #

peekElemOff :: Ptr (DataFrame t ds) -> Int -> IO (DataFrame t ds) #

pokeElemOff :: Ptr (DataFrame t ds) -> Int -> DataFrame t ds -> IO () #

peekByteOff :: Ptr b -> Int -> IO (DataFrame t ds) #

pokeByteOff :: Ptr b -> Int -> DataFrame t ds -> IO () #

peek :: Ptr (DataFrame t ds) -> IO (DataFrame t ds) #

poke :: Ptr (DataFrame t ds) -> DataFrame t ds -> IO () #

PrimBytes (DFBackend t ds) => PrimBytes (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame t ds) :: [Symbol] Source #

(Dimensions xns, KnownBackends ts (DimsBound xns), PrimBytes (DataFrame ts (DimsBound xns))) => PrimBytes (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame ts xns) :: [Symbol] Source #

RealFloatExtras (DFBackend t ds) => RealFloatExtras (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

hypot :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds Source #

maxFinite :: DataFrame t ds Source #

(RealFloatExtras (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFloatExtras (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

hypot :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] Source #

maxFinite :: DataFrame t '[] Source #

RealExtras (DFBackend t ds) => RealExtras (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

copysign :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds Source #

(RealExtras (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealExtras (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

copysign :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] Source #

Epsilon (DFBackend t ds) => Epsilon (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

epsilon :: DataFrame t ds Source #

(Epsilon (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Epsilon (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

epsilon :: DataFrame ts '[] Source #

ProductOrder (DFBackend t ds) => ProductOrder (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

cmp :: DataFrame t ds -> DataFrame t ds -> PartialOrdering Source #

(xns ~ Map 'N (DimsBound xns), ProductOrder (DataFrame ts (DimsBound xns))) => ProductOrder (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

cmp :: DataFrame ts xns -> DataFrame ts xns -> PartialOrdering Source #

newtype DataFrame (t :: Type) (ns :: [Nat]) Source #

Single frame

Instance details

Defined in Numeric.DataFrame.Type

newtype DataFrame (t :: Type) (ns :: [Nat]) = SingleFrame {}
data DataFrame (ts :: l) (xns :: [XNat]) Source #

Data frame with some dimensions missing at compile time. Pattern-match against its constructor to get a Nat-indexed data frame.

Instance details

Defined in Numeric.DataFrame.Type

data DataFrame (ts :: l) (xns :: [XNat]) = (All (KnownDimType :: XNat -> Constraint) xns, FixedDims xns ns, Dimensions ns, KnownBackends ts ns) => XFrame (DataFrame ts ns)
newtype DataFrame (ts :: [Type]) (ns :: [Nat]) Source #

Multiple "columns" of data frames of the same shape

Instance details

Defined in Numeric.DataFrame.Type

newtype DataFrame (ts :: [Type]) (ns :: [Nat]) = MultiFrame (TypedList (DataFrame' ns :: Type -> Type) ts)
type Rep (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type Rep (DataFrame ts ds)
type Rep (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type Rep (DataFrame t ds)
type PrimFields (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type PrimFields (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

pattern Z :: forall (xs :: [Type]) (ns :: [Nat]). () => xs ~ '[] => DataFrame xs ns Source #

Empty MultiFrame

pattern (:*:) :: forall (xs :: [Type]) (ns :: [Nat]). () => forall (y :: Type) (ys :: [Type]). xs ~ (y ': ys) => DataFrame y ns -> DataFrame ys ns -> DataFrame xs ns infixr 6 Source #

Constructing a MultiFrame using DataFrame columns

pattern S :: forall (t :: Type). t -> DataFrame t ('[] :: [Nat]) Source #

A scalar DataFrame is just a newtype wrapper on a value.

pattern DF2 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (2 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t (2 ': ds) Source #

pattern DF3 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (3 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (3 ': ds) Source #

pattern DF4 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (4 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (4 ': ds) Source #

pattern DF5 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (5 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (5 ': ds) Source #

pattern DF6 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (6 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (6 ': ds) Source #

pattern DF7 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (7 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (7 ': ds) Source #

pattern DF8 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (8 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (8 ': ds) Source #

pattern DF9 :: forall (t :: Type) (ds :: [Nat]). (PrimBytes t, Dimensions (9 ': ds)) => (Dimensions ds, KnownBackend t ds) => DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> DataFrame t (9 ': ds) Source #

scalar :: t -> DataFrame t ('[] :: [Nat]) Source #

Convert any type to a scalar wrapper

unScalar :: DataFrame t ('[] :: [Nat]) -> t Source #

Convert a scalar back to an ordinary type

class IndexFrame t d ds where Source #

Index one dimension deep into a DataFrame.

Methods

(!) :: DataFrame t (d ': ds) -> Word -> DataFrame t ds Source #

Index one dimension deep into a DataFrame.

Note, this function does not provide indexing safety at the type level; it throws an OutOfDimBounds exception if an index is out of bounds (unless unsafeindices package flag is enabled, which is even more dangerous).

Instances

Instances details
(PrimArray t (DataFrame t (d ': ds)), KnownDim d, KnownBackend t ds) => IndexFrame (t :: Type) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (d ': ds) -> Word -> DataFrame t ds Source #

PrimBytes t => IndexFrame (t :: Type) (xd :: XNat) (xds :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (xd ': xds) -> Word -> DataFrame t xds Source #

(PrimArray t (DataFrame t '[d]), KnownDim d) => IndexFrame (t :: Type) (d :: Nat) ('[] :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (d ': '[]) -> Word -> DataFrame t '[] Source #

(RepresentableList ts, All PrimBytes ts) => IndexFrame (ts :: [Type]) (xd :: XNat) (xds :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame ts (xd ': xds) -> Word -> DataFrame ts xds Source #

IndexFrame ('[] :: [Type]) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame '[] (d ': ds) -> Word -> DataFrame '[] ds Source #

(IndexFrame t d ds, IndexFrame ts d ds) => IndexFrame (t ': ts :: [Type]) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame (t ': ts) (d ': ds) -> Word -> DataFrame (t ': ts) ds Source #

type family SubFrameIndexCtx (d :: k) (idxN :: k) (subN :: k) :: Constraint where ... Source #

This type family describes two strategies for dealing with dimensions when slicing a DataFrame.

If the original space dimension (d) is fixed at compile time (d :: Nat or d ~ N n), then we enforce the safety of a slicing operation with types: the index space is bounded by the size of the original space minus the subframe size.

If the original space dimension (d) is not fixed (d ~ XN m), then we give up. Just let the user do the slicing as easy as possible, and throw an OutOfDimBounds exception at runtime if the index plus the sliced size is greater than the original size of the DataFrame.

Equations

SubFrameIndexCtx (n :: Nat) idxN subN = (n + 1) ~ (idxN + subN) 
SubFrameIndexCtx (N n) idxN subN = ((n + 1) ~ (DimBound idxN + DimBound subN), idxN ~ N (DimBound idxN), subN ~ N (DimBound subN)) 
SubFrameIndexCtx (XN m) idxN subN = (idxN ~ XN m, subN ~ N (DimBound subN)) 

Flexible assembling and disassembling

type family PackDF (t :: Type) (ds :: [Nat]) (d :: Nat) (r :: Type) :: Type where ... Source #

Represent smart constructor functions packDF and unpackDF.

Equations

PackDF _ _ 0 r = r 
PackDF t ds d r = DataFrame t ds -> PackDF t ds (d - 1) r 

packDF :: forall (t :: Type) (d :: Nat) (ds :: [Nat]). (PrimBytes t, Dimensions (d ': ds)) => PackDF t ds d (DataFrame t (d ': ds)) Source #

Takes d arguments of type DataFrame t ds and produce a DataFrame t (d ': ds).

NB: always use TypeApplications extension with this function to apply all type arguments! Otherwise, a very dumb type family PackDF will not infer the types for you.

The following example creates a Matrix Double 12 3 filled with twelve 3D vectors (using fromInteger of Vector Double 3):

>>> packDF @Double @12 @'[3] 1 2 3 4 5 6 7 8 9 10 11 12

packDF and unpackDF together serve as a generic constructor for a DataFrame of an arbitrary (statically known) size.

unpackDF :: forall (t :: Type) (d :: Nat) (ds :: [Nat]) (rep :: RuntimeRep) (r :: TYPE rep). (PrimBytes t, Dimensions (d ': ds)) => PackDF t ds d (Dict (Dimensions ds, KnownBackend t ds) -> r) -> DataFrame t (d ': ds) -> r Source #

Takes a function (e.g. a constructor) with d+1 argument (df1, df2, .. dfd, Dict) and a DataFrame t (d ': ds). Feeds the dataframe elements into that function. For example, you can pass a tuple to this function, and get all dataframe elements (and some dictionaries -- useful evidence to work with element frames)

NB: always use TypeApplications extension with this function to apply all type arguments! Otherwise, a very dumb type family PackDF will not infer the types for you.

The following example unpacks a 3D vector (created using fromInteger of Vector Double 3) into a 4-tuple with three scalars and one Dict:

>>> unpackDF @Double @3 @'[] (,,,) 2

packDF and unpackDF together serve as a generic constructor for a DataFrame of an arbitrary (statically known) size.

appendDF :: forall (n :: Nat) (m :: Nat) (ds :: [Nat]) (t :: Type). (PrimBytes t, Dimensions ds, KnownDim n, KnownDim m) => DataFrame t (n :+ ds) -> DataFrame t (m :+ ds) -> DataFrame t ((n + m) :+ ds) Source #

Append one DataFrame to another, sum up the first dimension.

If you want to deconstruct a DataFrame, use index or slice instead.

consDF :: forall (n :: Nat) (ds :: [Nat]) (t :: Type). (PrimBytes t, Dimensions ds, KnownDim n) => DataFrame t ds -> DataFrame t (n :+ ds) -> DataFrame t ((n + 1) :+ ds) Source #

Append a small DataFrame to a big DataFrame on the left.

If you want to deconstruct a DataFrame, use index or slice instead.

snocDF :: forall (n :: Nat) (ds :: [Nat]) (t :: Type). (PrimBytes t, Dimensions ds, KnownDim n) => DataFrame t (n :+ ds) -> DataFrame t ds -> DataFrame t ((n + 1) :+ ds) Source #

Append a small DataFrame to a big DataFrame on the right.

If you want to deconstruct a DataFrame, use index or slice instead.

fromFlatList :: forall (t :: Type) (ds :: [Nat]). PrimArray t (DataFrame t ds) => Dims ds -> t -> [t] -> DataFrame t ds Source #

Construct a DataFrame from a flat list.

The values are filled according to the DataFrame layout: row-by-row and further from the last dimension (least significant) to the first dimension (most significant).

If the argument list is shorter than totalDim, then the rest of the frame is padded with a default value (second argument).

If the argument list is longer than totalDim, then unused values are dropped. If you want, you can pass an infinite list as an argument, i.e. the following is a valid use:

>>> fromFlatList (dims :: Dims '[2,5]) 0 [6,8..]

fromListWithDefault :: forall (t :: Type) (d :: Nat) (ds :: [Nat]). (PrimBytes t, Dimensions (d ': ds)) => DataFrame t ds -> [DataFrame t ds] -> DataFrame t (d ': ds) Source #

Construct a DataFrame from a list of smaller DataFrames.

If the argument list is shorter than d, then the rest of the frame is padded with a default value (first argument).

If the argument list is longer than d, then unused values are dropped. If you want, you can pass an infinite list as an argument.

fromList :: forall (t :: Type) (ds :: [Nat]) (xds :: [XNat]). (PrimBytes t, Dimensions ds, xds ~ Map N ds, ds ~ UnMap N xds) => [DataFrame t ds] -> DataFrame t (XN 0 ': xds) Source #

Construct a dynamic DataFrame from a list of smaller DataFrames. Pattern-match against the resulting XFrame to find out its dimensionality.

You must not provide an infinite list as an argument.

constrainDF :: forall (ds :: [XNat]) (ys :: [XNat]) t. (BoundedDims ds, All KnownDimType ds) => DataFrame t ys -> Maybe (DataFrame t ds) Source #

Try to convert between XNat-indexed DataFrames.

This is useful for imposing restrictions on unknown DataFrames, e.g. increasing the minimum number of elements.

asDiag :: forall (n :: Nat) (m :: Nat) (ds :: [Nat]) (t :: Type). (Dimensions ds, KnownDim n, KnownDim m, KnownBackend t (Min n m :+ ds), KnownBackend t (n :+ (m :+ ds)), PrimBytes t) => DataFrame t (Min n m :+ ds) -> DataFrame t (n :+ (m :+ ds)) Source #

Place elements of a vector on the main diagonal of a matrix; fill the rest of the matrix with zeroes.

Note, this function is naturally generalized onto higher dimensions (which can be seen from the type signature).

Note, the argument of this function does not fully determine its result type. This may cause some obscure type errors. Specify type parameters n and m explicitly or make sure the result type is fixed.

Infer type class instances

class KnownBackend t ds (BackendFamily t ds) => KnownBackend t (ds :: [Nat]) Source #

Instances

Instances details
KnownBackend t ds (BackendFamily t ds) => KnownBackend t ds Source # 
Instance details

Defined in Numeric.DataFrame.Internal.Backend

type DFBackend (t :: Type) (ds :: [Nat]) = Backend I t ds (BackendFamily t ds) Source #

Implementation behind the DataFrame

type family KnownBackends (ts :: l) (ns :: [Nat]) :: Constraint where ... Source #

I use this kind-polymorphic constraint to generalize XFrame and SomeDataFrame over SingleFrame and MultiFrame.

Equations

KnownBackends (t :: Type) ns = KnownBackend t ns 
KnownBackends ('[] :: [Type]) _ = () 
KnownBackends (t ': ts :: [Type]) ns = (KnownBackend t ns, KnownBackends ts ns) 

class InferKnownBackend t (ds :: [Nat]) where Source #

Allow inferring KnownBackends if you know the dimensions and the element types.

Methods

inferKnownBackend :: Dict (KnownBackends t ds) Source #

Infer KnownBackends if you know the dimensions and the element types.

Instances

Instances details
(PrimBytes t, Dimensions ds) => InferKnownBackend (t :: Type) ds Source # 
Instance details

Defined in Numeric.DataFrame.Type

(RepresentableList ts, All PrimBytes ts, Dimensions ds) => InferKnownBackend (ts :: [Type]) ds Source # 
Instance details

Defined in Numeric.DataFrame.Type

inferPrimElem :: forall (t :: Type) (d :: Nat) (ds :: [Nat]). KnownBackend t (d ': ds) => DataFrame t (d ': ds) -> Dict (PrimBytes t) Source #

Evidence that the elements of the DataFrame are PrimBytes.

Re-exports

data Dim (x :: k) where #

Singleton type to store type-level dimension value.

On the one hand, it can be used to let type-inference system know relations between type-level naturals. On the other hand, this is just a newtype wrapper on the Word type.

Usually, the type parameter of Dim is either Nat or XNat. If dimensionality of your data is known in advance, use Nat; if you know the size of some dimensions, but do not know the size of others, use XNats to represent them.

Bundled Patterns

pattern D :: KnownDimType d => (KindOf d ~ Nat, KnownDim d) => Dim d

Match against this pattern to bring KnownDim instance into scope.

pattern D1 :: () => n ~ 1 => Dim n

Match Dim n against a concrete Nat

pattern D25 :: () => n ~ 25 => Dim n

Match Dim n against a concrete Nat

pattern D24 :: () => n ~ 24 => Dim n

Match Dim n against a concrete Nat

pattern D23 :: () => n ~ 23 => Dim n

Match Dim n against a concrete Nat

pattern D22 :: () => n ~ 22 => Dim n

Match Dim n against a concrete Nat

pattern D21 :: () => n ~ 21 => Dim n

Match Dim n against a concrete Nat

pattern D20 :: () => n ~ 20 => Dim n

Match Dim n against a concrete Nat

pattern D19 :: () => n ~ 19 => Dim n

Match Dim n against a concrete Nat

pattern D18 :: () => n ~ 18 => Dim n

Match Dim n against a concrete Nat

pattern D17 :: () => n ~ 17 => Dim n

Match Dim n against a concrete Nat

pattern D16 :: () => n ~ 16 => Dim n

Match Dim n against a concrete Nat

pattern D15 :: () => n ~ 15 => Dim n

Match Dim n against a concrete Nat

pattern D14 :: () => n ~ 14 => Dim n

Match Dim n against a concrete Nat

pattern D13 :: () => n ~ 13 => Dim n

Match Dim n against a concrete Nat

pattern D12 :: () => n ~ 12 => Dim n

Match Dim n against a concrete Nat

pattern D11 :: () => n ~ 11 => Dim n

Match Dim n against a concrete Nat

pattern D10 :: () => n ~ 10 => Dim n

Match Dim n against a concrete Nat

pattern D9 :: () => n ~ 9 => Dim n

Match Dim n against a concrete Nat

pattern D8 :: () => n ~ 8 => Dim n

Match Dim n against a concrete Nat

pattern D7 :: () => n ~ 7 => Dim n

Match Dim n against a concrete Nat

pattern D6 :: () => n ~ 6 => Dim n

Match Dim n against a concrete Nat

pattern D5 :: () => n ~ 5 => Dim n

Match Dim n against a concrete Nat

pattern D4 :: () => n ~ 4 => Dim n

Match Dim n against a concrete Nat

pattern D3 :: () => n ~ 3 => Dim n

Match Dim n against a concrete Nat

pattern D2 :: () => n ~ 2 => Dim n

Match Dim n against a concrete Nat

pattern D0 :: () => n ~ 0 => Dim n

Match Dim n against a concrete Nat

pattern Dx :: forall k d (m :: Nat) n. KnownDimType d => forall. (d ~~ XN m, m <= n) => Dim n -> Dim d

XNat that is unknown at compile time. Same as SomeNat, but for a dimension: Hide dimension size inside, but allow specifying its minimum possible value.

pattern Dn :: KnownDimType d => d ~~ N n => Dim n -> Dim d

Statically known XNat

Instances

Instances details
Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Eq (Dim n) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dim n -> Dim n -> Bool #

(/=) :: Dim n -> Dim n -> Bool #

Eq (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dim x -> Dim x -> Bool #

(/=) :: Dim x -> Dim x -> Bool #

Typeable d => Data (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> Dim d -> c (Dim d) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dim d) #

toConstr :: Dim d -> Constr #

dataTypeOf :: Dim d -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Dim d)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Dim d)) #

gmapT :: (forall b. Data b => b -> b) -> Dim d -> Dim d #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Dim d -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Dim d -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Dim d -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Dim d -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

Ord (Dim n) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dim n -> Dim n -> Ordering #

(<) :: Dim n -> Dim n -> Bool #

(<=) :: Dim n -> Dim n -> Bool #

(>) :: Dim n -> Dim n -> Bool #

(>=) :: Dim n -> Dim n -> Bool #

max :: Dim n -> Dim n -> Dim n #

min :: Dim n -> Dim n -> Dim n #

Ord (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dim x -> Dim x -> Ordering #

(<) :: Dim x -> Dim x -> Bool #

(<=) :: Dim x -> Dim x -> Bool #

(>) :: Dim x -> Dim x -> Bool #

(>=) :: Dim x -> Dim x -> Bool #

max :: Dim x -> Dim x -> Dim x #

min :: Dim x -> Dim x -> Dim x #

BoundedDims xs => Read (Dims xs) 
Instance details

Defined in Numeric.Dimensions.Dim

BoundedDim x => Read (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Show (Dims xs) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

showsPrec :: Int -> Dims xs -> ShowS #

show :: Dims xs -> String #

showList :: [Dims xs] -> ShowS #

Show (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

showsPrec :: Int -> Dim x -> ShowS #

show :: Dim x -> String #

showList :: [Dim x] -> ShowS #

KnownDim d => Generic (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

Associated Types

type Rep (Dim d) :: Type -> Type #

Methods

from :: Dim d -> Rep (Dim d) x #

to :: Rep (Dim d) x -> Dim d #

type Rep (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

type Rep (Dim d) = D1 ('MetaData "Dim" "Numeric.Dim" "dimensions" 'False) (C1 ('MetaCons (AppendSymbol "D" (ShowNat d)) 'PrefixI 'False) (U1 :: Type -> Type))

data Idx (d :: k) #

This type is used to index a single dimension.

  • (k ~ Nat) => the range of indices is from 0 to d-1.
  • (d ~ N n) => the range of indices is from 0 to n-1.
  • (d ~ XN m) => the range of indices is from 0 to maxBound :: Word.

That is, using Idx (n :: Nat) or Idx (N n) is guaranteed to be safe by the type system. But an index of type Idx (XN m) can have any value, and using it may yield an OutOfDimBounds exception -- just the same as a generic index function that takes a plain Int or Word as an argument. Thus, if you have data indexed by (XN m), I would suggest to use lookup-like functions that return Maybe. You're warned.

Instances

Instances details
BoundedDim d => Bounded (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

minBound :: Idx d #

maxBound :: Idx d #

BoundedDims ds => Bounded (Idxs ds) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

minBound :: Idxs ds #

maxBound :: Idxs ds #

KnownDim n => Enum (Idx n) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx n -> Idx n #

pred :: Idx n -> Idx n #

toEnum :: Int -> Idx n #

fromEnum :: Idx n -> Int #

enumFrom :: Idx n -> [Idx n] #

enumFromThen :: Idx n -> Idx n -> [Idx n] #

enumFromTo :: Idx n -> Idx n -> [Idx n] #

enumFromThenTo :: Idx n -> Idx n -> Idx n -> [Idx n] #

BoundedDim d => Enum (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx d -> Idx d #

pred :: Idx d -> Idx d #

toEnum :: Int -> Idx d #

fromEnum :: Idx d -> Int #

enumFrom :: Idx d -> [Idx d] #

enumFromThen :: Idx d -> Idx d -> [Idx d] #

enumFromTo :: Idx d -> Idx d -> [Idx d] #

enumFromThenTo :: Idx d -> Idx d -> Idx d -> [Idx d] #

Enum (Idx (XN m)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx (XN m) -> Idx (XN m) #

pred :: Idx (XN m) -> Idx (XN m) #

toEnum :: Int -> Idx (XN m) #

fromEnum :: Idx (XN m) -> Int #

enumFrom :: Idx (XN m) -> [Idx (XN m)] #

enumFromThen :: Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

enumFromTo :: Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

enumFromThenTo :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

KnownDim n => Enum (Idx (N n)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx (N n) -> Idx (N n) #

pred :: Idx (N n) -> Idx (N n) #

toEnum :: Int -> Idx (N n) #

fromEnum :: Idx (N n) -> Int #

enumFrom :: Idx (N n) -> [Idx (N n)] #

enumFromThen :: Idx (N n) -> Idx (N n) -> [Idx (N n)] #

enumFromTo :: Idx (N n) -> Idx (N n) -> [Idx (N n)] #

enumFromThenTo :: Idx (N n) -> Idx (N n) -> Idx (N n) -> [Idx (N n)] #

Dimensions ds => Enum (Idxs ds)

ds must be fixed (either [Nat] or all (N n)) to know exact bounds in each dimension.

Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idxs ds -> Idxs ds #

pred :: Idxs ds -> Idxs ds #

toEnum :: Int -> Idxs ds #

fromEnum :: Idxs ds -> Int #

enumFrom :: Idxs ds -> [Idxs ds] #

enumFromThen :: Idxs ds -> Idxs ds -> [Idxs ds] #

enumFromTo :: Idxs ds -> Idxs ds -> [Idxs ds] #

enumFromThenTo :: Idxs ds -> Idxs ds -> Idxs ds -> [Idxs ds] #

Eq (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(==) :: Idx d -> Idx d -> Bool #

(/=) :: Idx d -> Idx d -> Bool #

Eq (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(==) :: Idxs xs -> Idxs xs -> Bool #

(/=) :: Idxs xs -> Idxs xs -> Bool #

BoundedDim d => Integral (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

quot :: Idx d -> Idx d -> Idx d #

rem :: Idx d -> Idx d -> Idx d #

div :: Idx d -> Idx d -> Idx d #

mod :: Idx d -> Idx d -> Idx d #

quotRem :: Idx d -> Idx d -> (Idx d, Idx d) #

divMod :: Idx d -> Idx d -> (Idx d, Idx d) #

toInteger :: Idx d -> Integer #

(Typeable d, Typeable k) => Data (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> Idx d -> c (Idx d) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Idx d) #

toConstr :: Idx d -> Constr #

dataTypeOf :: Idx d -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Idx d)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Idx d)) #

gmapT :: (forall b. Data b => b -> b) -> Idx d -> Idx d #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Idx d -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Idx d -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Idx d -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Idx d -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Idx d -> m (Idx d) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Idx d -> m (Idx d) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Idx d -> m (Idx d) #

KnownDim n => Num (Idx n) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx n -> Idx n -> Idx n #

(-) :: Idx n -> Idx n -> Idx n #

(*) :: Idx n -> Idx n -> Idx n #

negate :: Idx n -> Idx n #

abs :: Idx n -> Idx n #

signum :: Idx n -> Idx n #

fromInteger :: Integer -> Idx n #

BoundedDim d => Num (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx d -> Idx d -> Idx d #

(-) :: Idx d -> Idx d -> Idx d #

(*) :: Idx d -> Idx d -> Idx d #

negate :: Idx d -> Idx d #

abs :: Idx d -> Idx d #

signum :: Idx d -> Idx d #

fromInteger :: Integer -> Idx d #

Num (Idx (XN m)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

(-) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

(*) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

negate :: Idx (XN m) -> Idx (XN m) #

abs :: Idx (XN m) -> Idx (XN m) #

signum :: Idx (XN m) -> Idx (XN m) #

fromInteger :: Integer -> Idx (XN m) #

KnownDim n => Num (Idx (N n)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

(-) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

(*) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

negate :: Idx (N n) -> Idx (N n) #

abs :: Idx (N n) -> Idx (N n) #

signum :: Idx (N n) -> Idx (N n) #

fromInteger :: Integer -> Idx (N n) #

Ord (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

compare :: Idx d -> Idx d -> Ordering #

(<) :: Idx d -> Idx d -> Bool #

(<=) :: Idx d -> Idx d -> Bool #

(>) :: Idx d -> Idx d -> Bool #

(>=) :: Idx d -> Idx d -> Bool #

max :: Idx d -> Idx d -> Idx d #

min :: Idx d -> Idx d -> Idx d #

Ord (Idxs xs)

Compare indices by their importance in lexicorgaphic order from the first dimension to the last dimension (the first dimension is the most significant one).

Literally,

compare a b = compare (listIdxs a) (listIdxs b)

This is the same compare rule, as for Dims. This is also consistent with offsets:

sort == sortOn fromEnum
Instance details

Defined in Numeric.Dimensions.Idx

Methods

compare :: Idxs xs -> Idxs xs -> Ordering #

(<) :: Idxs xs -> Idxs xs -> Bool #

(<=) :: Idxs xs -> Idxs xs -> Bool #

(>) :: Idxs xs -> Idxs xs -> Bool #

(>=) :: Idxs xs -> Idxs xs -> Bool #

max :: Idxs xs -> Idxs xs -> Idxs xs #

min :: Idxs xs -> Idxs xs -> Idxs xs #

BoundedDim d => Read (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

BoundedDims xs => Read (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

BoundedDim d => Real (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

toRational :: Idx d -> Rational #

Show (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

showsPrec :: Int -> Idx d -> ShowS #

show :: Idx d -> String #

showList :: [Idx d] -> ShowS #

Show (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

showsPrec :: Int -> Idxs xs -> ShowS #

show :: Idxs xs -> String #

showList :: [Idxs xs] -> ShowS #

Generic (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Associated Types

type Rep (Idx d) :: Type -> Type #

Methods

from :: Idx d -> Rep (Idx d) x #

to :: Rep (Idx d) x -> Idx d #

Storable (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

sizeOf :: Idx d -> Int #

alignment :: Idx d -> Int #

peekElemOff :: Ptr (Idx d) -> Int -> IO (Idx d) #

pokeElemOff :: Ptr (Idx d) -> Int -> Idx d -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Idx d) #

pokeByteOff :: Ptr b -> Int -> Idx d -> IO () #

peek :: Ptr (Idx d) -> IO (Idx d) #

poke :: Ptr (Idx d) -> Idx d -> IO () #

PrimBytes (Idx x) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Idx x) :: [Symbol] Source #

RepresentableList xs => PrimBytes (Idxs xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Idxs xs) :: [Symbol] Source #

type Rep (Idx d) 
Instance details

Defined in Numeric.Dimensions.Idx

type Rep (Idx d) = D1 ('MetaData "Idx" "Numeric.Dimensions.Idx" "dimensions-2.1.1.0-2AAe0No328E14IWRQP3FUr" 'True) (C1 ('MetaCons "Idx'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))
type PrimFields (Idx x) Source # 
Instance details

Defined in Numeric.PrimBytes

type PrimFields (Idx x) = '[] :: [Symbol]
type PrimFields (Idxs xs) Source # 
Instance details

Defined in Numeric.PrimBytes

type PrimFields (Idxs xs) = '[] :: [Symbol]

data Nat #

(Kind) This is the kind of type-level natural numbers.

Instances

Instances details
KnownDimKind Nat 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimKind :: DimKind Nat #

KnownDimType (n :: Nat) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimType :: DimType n #

KnownNat n => KnownDim (n :: Nat) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim n #

KnownDim 0 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 0 #

KnownDim 1 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 1 #

KnownDim 2 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 2 #

KnownDim 3 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 3 #

KnownDim 4 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 4 #

KnownDim 5 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 5 #

KnownDim 6 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 6 #

KnownDim 7 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 7 #

KnownDim 8 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 8 #

KnownDim 9 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 9 #

KnownDim 10 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 10 #

KnownDim 11 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 11 #

KnownDim 12 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 12 #

KnownDim 13 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 13 #

KnownDim 14 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 14 #

KnownDim 15 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 15 #

KnownDim 16 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 16 #

KnownDim 17 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 17 #

KnownDim 18 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 18 #

KnownDim 19 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 19 #

KnownDim 20 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 20 #

KnownDim 21 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 21 #

KnownDim 22 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 22 #

KnownDim 23 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 23 #

KnownDim 24 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 24 #

KnownDim 25 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim 25 #

KnownDim n => BoundedDim (n :: Nat) 
Instance details

Defined in Numeric.Dimensions.Dim

Associated Types

type DimBound n :: Nat #

Methods

dimBound :: Dim (DimBound n) #

constrainDim :: forall k1 (y :: k1). Dim y -> Maybe (Dim n) #

KnownDim n => SortBy (n :: Nat) Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (n ': ns) -> ST s () Source #

SortBy 0 Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (0 ': ns) -> ST s () Source #

SortBy 1 Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (1 ': ns) -> ST s () Source #

SortBy 2 Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (2 ': ns) -> ST s () Source #

SortBy 3 Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (3 ': ns) -> ST s () Source #

SortBy 4 Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (4 ': ns) -> ST s () Source #

(PrimArray t (DataFrame t (d ': ds)), KnownDim d, KnownBackend t ds) => IndexFrame (t :: Type) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (d ': ds) -> Word -> DataFrame t ds Source #

(ConcatList as bs asbs, SubSpaceCtx t as bs asbs) => SubSpace t (as :: [Nat]) (bs :: [Nat]) (asbs :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.SubSpace

Associated Types

type SubSpaceCtx t as bs asbs Source #

Methods

joinDataFrameI :: DataFrame (DataFrame t bs) as -> DataFrame t asbs

indexOffsetI :: Int -> DataFrame t asbs -> DataFrame t bs

updateOffsetI :: Int -> DataFrame t bs -> DataFrame t asbs -> DataFrame t asbs

indexI :: Idxs as -> DataFrame t asbs -> DataFrame t bs

updateI :: Idxs as -> DataFrame t bs -> DataFrame t asbs -> DataFrame t asbs

ewmapI :: forall s (bs' :: [k]) (asbs' :: [k]). SubSpace s as bs' asbs' => (DataFrame s bs' -> DataFrame t bs) -> DataFrame s asbs' -> DataFrame t asbs

iwmapI :: forall s (bs' :: [k]) (asbs' :: [k]). SubSpace s as bs' asbs' => (Idxs as -> DataFrame s bs' -> DataFrame t bs) -> DataFrame s asbs' -> DataFrame t asbs

ewgenI :: DataFrame t bs -> DataFrame t asbs

iwgenI :: (Idxs as -> DataFrame t bs) -> DataFrame t asbs

ewfoldlI :: (b -> DataFrame t bs -> b) -> b -> DataFrame t asbs -> b

iwfoldlI :: (Idxs as -> b -> DataFrame t bs -> b) -> b -> DataFrame t asbs -> b

ewfoldrI :: (DataFrame t bs -> b -> b) -> b -> DataFrame t asbs -> b

iwfoldrI :: (Idxs as -> DataFrame t bs -> b -> b) -> b -> DataFrame t asbs -> b

elementWiseI :: forall s (bs' :: [k]) (asbs' :: [k]) f. (Applicative f, SubSpace s as bs' asbs') => (DataFrame s bs' -> f (DataFrame t bs)) -> DataFrame s asbs' -> f (DataFrame t asbs)

indexWiseI :: forall s (bs' :: [k]) (asbs' :: [k]) f. (Applicative f, SubSpace s as bs' asbs') => (Idxs as -> DataFrame s bs' -> f (DataFrame t bs)) -> DataFrame s asbs' -> f (DataFrame t asbs)

(PrimArray t (DataFrame t '[d]), KnownDim d) => IndexFrame (t :: Type) (d :: Nat) ('[] :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (d ': '[]) -> Word -> DataFrame t '[] Source #

(PrimArray t (DFBackend t ds), PrimBytes t) => PrimArray t (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t ds Source #

ix# :: Int# -> DataFrame t ds -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t ds #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t ds -> DataFrame t ds Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t ds -> r Source #

offsetElems :: DataFrame t ds -> Int# Source #

uniqueOrCumulDims :: DataFrame t ds -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t ds Source #

Ord (ProductOrd (DFBackend t ds)) => Ord (ProductOrd (DataFrame t ds)) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Ord (ProductOrd (DFBackend t ds)), Eq (DFBackend t ds)) => Ord (ProductOrd (DataFrame t ds)) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(KnownDim n, KnownDim m, PrimArray t (Matrix t n m), PrimArray t (Matrix t m n)) => MatrixTranspose (t :: Type) (n :: Nat) (m :: Nat) Source # 
Instance details

Defined in Numeric.Matrix.Internal

Methods

transpose :: Matrix t n m -> Matrix t m n Source #

IndexFrame ('[] :: [Type]) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame '[] (d ': ds) -> Word -> DataFrame '[] ds Source #

(IndexFrame t d ds, IndexFrame ts d ds) => IndexFrame (t ': ts :: [Type]) (d :: Nat) (ds :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame (t ': ts) (d ': ds) -> Word -> DataFrame (t ': ts) ds Source #

Class (KnownNat n) (KnownDim n) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

cls :: KnownDim n :- KnownNat n #

KnownDim n => Enum (Idx n) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx n -> Idx n #

pred :: Idx n -> Idx n #

toEnum :: Int -> Idx n #

fromEnum :: Idx n -> Int #

enumFrom :: Idx n -> [Idx n] #

enumFromThen :: Idx n -> Idx n -> [Idx n] #

enumFromTo :: Idx n -> Idx n -> [Idx n] #

enumFromThenTo :: Idx n -> Idx n -> Idx n -> [Idx n] #

Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Eq (Dim n) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dim n -> Dim n -> Bool #

(/=) :: Dim n -> Dim n -> Bool #

Typeable d => Data (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> Dim d -> c (Dim d) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dim d) #

toConstr :: Dim d -> Constr #

dataTypeOf :: Dim d -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (Dim d)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (Dim d)) #

gmapT :: (forall b. Data b => b -> b) -> Dim d -> Dim d #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Dim d -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> Dim d -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> Dim d -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> Dim d -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> Dim d -> m (Dim d) #

KnownDim n => Num (Idx n) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx n -> Idx n -> Idx n #

(-) :: Idx n -> Idx n -> Idx n #

(*) :: Idx n -> Idx n -> Idx n #

negate :: Idx n -> Idx n #

abs :: Idx n -> Idx n #

signum :: Idx n -> Idx n #

fromInteger :: Integer -> Idx n #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

Ord (Dim n) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dim n -> Dim n -> Ordering #

(<) :: Dim n -> Dim n -> Bool #

(<=) :: Dim n -> Dim n -> Bool #

(>) :: Dim n -> Dim n -> Bool #

(>=) :: Dim n -> Dim n -> Bool #

max :: Dim n -> Dim n -> Dim n #

min :: Dim n -> Dim n -> Dim n #

KnownDim d => Generic (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

Associated Types

type Rep (Dim d) :: Type -> Type #

Methods

from :: Dim d -> Rep (Dim d) x #

to :: Rep (Dim d) x -> Dim d #

Bounded (DFBackend t ds) => Bounded (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

minBound :: DataFrame t ds #

maxBound :: DataFrame t ds #

Enum (DFBackend t ds) => Enum (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

succ :: DataFrame t ds -> DataFrame t ds #

pred :: DataFrame t ds -> DataFrame t ds #

toEnum :: Int -> DataFrame t ds #

fromEnum :: DataFrame t ds -> Int #

enumFrom :: DataFrame t ds -> [DataFrame t ds] #

enumFromThen :: DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

enumFromTo :: DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

enumFromThenTo :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds -> [DataFrame t ds] #

AllFrames Eq ts ds => Eq (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(/=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

Eq (DFBackend t ds) => Eq (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame t ds -> DataFrame t ds -> Bool #

(/=) :: DataFrame t ds -> DataFrame t ds -> Bool #

Floating (DFBackend t ds) => Floating (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

pi :: DataFrame t ds #

exp :: DataFrame t ds -> DataFrame t ds #

log :: DataFrame t ds -> DataFrame t ds #

sqrt :: DataFrame t ds -> DataFrame t ds #

(**) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

logBase :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

sin :: DataFrame t ds -> DataFrame t ds #

cos :: DataFrame t ds -> DataFrame t ds #

tan :: DataFrame t ds -> DataFrame t ds #

asin :: DataFrame t ds -> DataFrame t ds #

acos :: DataFrame t ds -> DataFrame t ds #

atan :: DataFrame t ds -> DataFrame t ds #

sinh :: DataFrame t ds -> DataFrame t ds #

cosh :: DataFrame t ds -> DataFrame t ds #

tanh :: DataFrame t ds -> DataFrame t ds #

asinh :: DataFrame t ds -> DataFrame t ds #

acosh :: DataFrame t ds -> DataFrame t ds #

atanh :: DataFrame t ds -> DataFrame t ds #

log1p :: DataFrame t ds -> DataFrame t ds #

expm1 :: DataFrame t ds -> DataFrame t ds #

log1pexp :: DataFrame t ds -> DataFrame t ds #

log1mexp :: DataFrame t ds -> DataFrame t ds #

Fractional (DFBackend t ds) => Fractional (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(/) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

recip :: DataFrame t ds -> DataFrame t ds #

fromRational :: Rational -> DataFrame t ds #

Integral (DFBackend t ds) => Integral (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

quot :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

rem :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

div :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

mod :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

quotRem :: DataFrame t ds -> DataFrame t ds -> (DataFrame t ds, DataFrame t ds) #

divMod :: DataFrame t ds -> DataFrame t ds -> (DataFrame t ds, DataFrame t ds) #

toInteger :: DataFrame t ds -> Integer #

(AllFrames Data ts ds, Typeable ts, Typeable ds) => Data (DataFrame ts ds) Source #

Term-level structure of a MultiFrame ts is fully determined by its type Typeable ts. Thus, gunfold does not use its last argument (Constr) at all, relying on the structure of the type parameter.

Instance details

Defined in Numeric.DataFrame.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFrame ts ds -> c (DataFrame ts ds) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFrame ts ds) #

toConstr :: DataFrame ts ds -> Constr #

dataTypeOf :: DataFrame ts ds -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DataFrame ts ds)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DataFrame ts ds)) #

gmapT :: (forall b. Data b => b -> b) -> DataFrame ts ds -> DataFrame ts ds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame ts ds -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame ts ds -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataFrame ts ds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFrame ts ds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame ts ds -> m (DataFrame ts ds) #

(Data t, PrimBytes t, Typeable ds) => Data (DataFrame t ds) Source #

Term-level structure of a SingleFrame t ds is fully determined by its type dimensionality Typeable ds. Thus, gunfold does not use its last argument (Constr) at all, relying on the structure of the type parameter.

Instance details

Defined in Numeric.DataFrame.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFrame t ds -> c (DataFrame t ds) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFrame t ds) #

toConstr :: DataFrame t ds -> Constr #

dataTypeOf :: DataFrame t ds -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (DataFrame t ds)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (DataFrame t ds)) #

gmapT :: (forall b. Data b => b -> b) -> DataFrame t ds -> DataFrame t ds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame t ds -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFrame t ds -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataFrame t ds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFrame t ds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFrame t ds -> m (DataFrame t ds) #

Num (DFBackend t ds) => Num (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(+) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(-) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(*) :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

negate :: DataFrame t ds -> DataFrame t ds #

abs :: DataFrame t ds -> DataFrame t ds #

signum :: DataFrame t ds -> DataFrame t ds #

fromInteger :: Integer -> DataFrame t ds #

(AllFrames Eq ts ds, AllFrames Ord ts ds) => Ord (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame ts ds -> DataFrame ts ds -> Ordering #

(<) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(<=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(>) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(>=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

max :: DataFrame ts ds -> DataFrame ts ds -> DataFrame ts ds #

min :: DataFrame ts ds -> DataFrame ts ds -> DataFrame ts ds #

Ord (DFBackend t ds) => Ord (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame t ds -> DataFrame t ds -> Ordering #

(<) :: DataFrame t ds -> DataFrame t ds -> Bool #

(<=) :: DataFrame t ds -> DataFrame t ds -> Bool #

(>) :: DataFrame t ds -> DataFrame t ds -> Bool #

(>=) :: DataFrame t ds -> DataFrame t ds -> Bool #

max :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

min :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds #

(All Read ts, All PrimBytes ts, RepresentableList ts, Dimensions ds) => Read (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Read t, PrimBytes t, Dimensions ds) => Read (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Real (DFBackend t ds) => Real (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

toRational :: DataFrame t ds -> Rational #

RealFloat (DFBackend t ds) => RealFloat (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

RealFrac (DFBackend t ds) => RealFrac (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

properFraction :: Integral b => DataFrame t ds -> (b, DataFrame t ds) #

truncate :: Integral b => DataFrame t ds -> b #

round :: Integral b => DataFrame t ds -> b #

ceiling :: Integral b => DataFrame t ds -> b #

floor :: Integral b => DataFrame t ds -> b #

(All Show ts, All PrimBytes ts, Dimensions ds) => Show (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame ts ds -> ShowS #

show :: DataFrame ts ds -> String #

showList :: [DataFrame ts ds] -> ShowS #

(Show t, PrimBytes t, Dimensions ds) => Show (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame t ds -> ShowS #

show :: DataFrame t ds -> String #

showList :: [DataFrame t ds] -> ShowS #

Generic (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type Rep (DataFrame ts ds) :: Type -> Type #

Methods

from :: DataFrame ts ds -> Rep (DataFrame ts ds) x #

to :: Rep (DataFrame ts ds) x -> DataFrame ts ds #

(PrimBytes t, Dimensions ds) => Generic (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type Rep (DataFrame t ds) :: Type -> Type #

Methods

from :: DataFrame t ds -> Rep (DataFrame t ds) x #

to :: Rep (DataFrame t ds) x -> DataFrame t ds #

PrimBytes (DFBackend t ds) => PrimBytes (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame t ds) :: [Symbol] Source #

RealFloatExtras (DFBackend t ds) => RealFloatExtras (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

hypot :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds Source #

maxFinite :: DataFrame t ds Source #

RealExtras (DFBackend t ds) => RealExtras (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

copysign :: DataFrame t ds -> DataFrame t ds -> DataFrame t ds Source #

Epsilon (DFBackend t ds) => Epsilon (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

epsilon :: DataFrame t ds Source #

ProductOrder (DFBackend t ds) => ProductOrder (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

cmp :: DataFrame t ds -> DataFrame t ds -> PartialOrdering Source #

type DimBound (n :: Nat) 
Instance details

Defined in Numeric.Dimensions.Dim

type DimBound (n :: Nat) = n
newtype DataFrame (t :: Type) (ns :: [Nat]) Source #

Single frame

Instance details

Defined in Numeric.DataFrame.Type

newtype DataFrame (t :: Type) (ns :: [Nat]) = SingleFrame {}
type SubSpaceCtx t (as :: [Nat]) (bs :: [Nat]) (asbs :: [Nat]) Source # 
Instance details

Defined in Numeric.DataFrame.SubSpace

type SubSpaceCtx t (as :: [Nat]) (bs :: [Nat]) (asbs :: [Nat]) = (Dimensions as, Dimensions bs, Dimensions asbs, PrimArray t (DataFrame t asbs), PrimArray t (DataFrame t bs))
newtype DataFrame (ts :: [Type]) (ns :: [Nat]) Source #

Multiple "columns" of data frames of the same shape

Instance details

Defined in Numeric.DataFrame.Type

newtype DataFrame (ts :: [Type]) (ns :: [Nat]) = MultiFrame (TypedList (DataFrame' ns :: Type -> Type) ts)
type Rep (Dim d) 
Instance details

Defined in Numeric.Dimensions.Dim

type Rep (Dim d) = D1 ('MetaData "Dim" "Numeric.Dim" "dimensions" 'False) (C1 ('MetaCons (AppendSymbol "D" (ShowNat d)) 'PrefixI 'False) (U1 :: Type -> Type))
type Rep (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type Rep (DataFrame ts ds)
type Rep (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type Rep (DataFrame t ds)
type PrimFields (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

data XNat #

Either known or unknown at compile-time natural number

Constructors

XN Nat 
N Nat 

Instances

Instances details
KnownDimKind XNat 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimKind :: DimKind XNat #

BoundedDim xn => SortBy (xn :: XNat) Source # 
Instance details

Defined in Numeric.Subroutine.Sort

Methods

sortByInplace :: forall t s (ns :: [k]). PrimBytes t => (STDataFrame s t ns -> STDataFrame s t ns -> ST s Ordering) -> STDataFrame s t (xn ': ns) -> ST s () Source #

PrimBytes t => IndexFrame (t :: Type) (xd :: XNat) (xds :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame t (xd ': xds) -> Word -> DataFrame t xds Source #

(ConcatList as bs asbs, SubSpaceCtx t as bs asbs) => SubSpace t (as :: [XNat]) (bs :: [XNat]) (asbs :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.SubSpace

Associated Types

type SubSpaceCtx t as bs asbs Source #

Methods

joinDataFrameI :: DataFrame (DataFrame t bs) as -> DataFrame t asbs

indexOffsetI :: Int -> DataFrame t asbs -> DataFrame t bs

updateOffsetI :: Int -> DataFrame t bs -> DataFrame t asbs -> DataFrame t asbs

indexI :: Idxs as -> DataFrame t asbs -> DataFrame t bs

updateI :: Idxs as -> DataFrame t bs -> DataFrame t asbs -> DataFrame t asbs

ewmapI :: forall s (bs' :: [k]) (asbs' :: [k]). SubSpace s as bs' asbs' => (DataFrame s bs' -> DataFrame t bs) -> DataFrame s asbs' -> DataFrame t asbs

iwmapI :: forall s (bs' :: [k]) (asbs' :: [k]). SubSpace s as bs' asbs' => (Idxs as -> DataFrame s bs' -> DataFrame t bs) -> DataFrame s asbs' -> DataFrame t asbs

ewgenI :: DataFrame t bs -> DataFrame t asbs

iwgenI :: (Idxs as -> DataFrame t bs) -> DataFrame t asbs

ewfoldlI :: (b -> DataFrame t bs -> b) -> b -> DataFrame t asbs -> b

iwfoldlI :: (Idxs as -> b -> DataFrame t bs -> b) -> b -> DataFrame t asbs -> b

ewfoldrI :: (DataFrame t bs -> b -> b) -> b -> DataFrame t asbs -> b

iwfoldrI :: (Idxs as -> DataFrame t bs -> b -> b) -> b -> DataFrame t asbs -> b

elementWiseI :: forall s (bs' :: [k]) (asbs' :: [k]) f. (Applicative f, SubSpace s as bs' asbs') => (DataFrame s bs' -> f (DataFrame t bs)) -> DataFrame s asbs' -> f (DataFrame t asbs)

indexWiseI :: forall s (bs' :: [k]) (asbs' :: [k]) f. (Applicative f, SubSpace s as bs' asbs') => (Idxs as -> DataFrame s bs' -> f (DataFrame t bs)) -> DataFrame s asbs' -> f (DataFrame t asbs)

MatrixTranspose (t :: Type) (xn :: XNat) (xm :: XNat) Source # 
Instance details

Defined in Numeric.Matrix.Internal

Methods

transpose :: Matrix t xn xm -> Matrix t xm xn Source #

KnownDimType ('N n :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimType :: DimType ('N n) #

KnownDimType ('XN n :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimType :: DimType ('XN n) #

KnownDim n => KnownDim (N n :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dim :: Dim (N n) #

KnownDim m => BoundedDim (XN m :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

Associated Types

type DimBound (XN m) :: Nat #

Methods

dimBound :: Dim (DimBound (XN m)) #

constrainDim :: forall k1 (y :: k1). Dim y -> Maybe (Dim (XN m)) #

KnownDim n => BoundedDim (N n :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

Associated Types

type DimBound (N n) :: Nat #

Methods

dimBound :: Dim (DimBound (N n)) #

constrainDim :: forall k1 (y :: k1). Dim y -> Maybe (Dim (N n)) #

BoundedDims ('[] :: [XNat]) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimsBound :: Dims (DimsBound '[]) #

constrainDims :: forall k1 (ys :: [k1]). Dims ys -> Maybe (Dims '[]) #

(BoundedDim n, BoundedDims ns) => BoundedDims (n ': ns :: [XNat]) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

dimsBound :: Dims (DimsBound (n ': ns)) #

constrainDims :: forall k1 (ys :: [k1]). Dims ys -> Maybe (Dims (n ': ns)) #

(Dimensions xns, KnownBackend t (DimsBound xns), PrimArray t (DataFrame t (DimsBound xns)), PrimBytes t) => PrimArray t (DataFrame t xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t xns Source #

ix# :: Int# -> DataFrame t xns -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t xns #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t xns -> DataFrame t xns Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t xns -> r Source #

offsetElems :: DataFrame t xns -> Int# Source #

uniqueOrCumulDims :: DataFrame t xns -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t xns Source #

(RepresentableList ts, All PrimBytes ts) => IndexFrame (ts :: [Type]) (xd :: XNat) (xds :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(!) :: DataFrame ts (xd ': xds) -> Word -> DataFrame ts xds Source #

Enum (Idx (XN m)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx (XN m) -> Idx (XN m) #

pred :: Idx (XN m) -> Idx (XN m) #

toEnum :: Int -> Idx (XN m) #

fromEnum :: Idx (XN m) -> Int #

enumFrom :: Idx (XN m) -> [Idx (XN m)] #

enumFromThen :: Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

enumFromTo :: Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

enumFromThenTo :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) -> [Idx (XN m)] #

KnownDim n => Enum (Idx (N n)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idx (N n) -> Idx (N n) #

pred :: Idx (N n) -> Idx (N n) #

toEnum :: Int -> Idx (N n) #

fromEnum :: Idx (N n) -> Int #

enumFrom :: Idx (N n) -> [Idx (N n)] #

enumFromThen :: Idx (N n) -> Idx (N n) -> [Idx (N n)] #

enumFromTo :: Idx (N n) -> Idx (N n) -> [Idx (N n)] #

enumFromThenTo :: Idx (N n) -> Idx (N n) -> Idx (N n) -> [Idx (N n)] #

Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Eq (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dim x -> Dim x -> Bool #

(/=) :: Dim x -> Dim x -> Bool #

Num (Idx (XN m)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

(-) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

(*) :: Idx (XN m) -> Idx (XN m) -> Idx (XN m) #

negate :: Idx (XN m) -> Idx (XN m) #

abs :: Idx (XN m) -> Idx (XN m) #

signum :: Idx (XN m) -> Idx (XN m) #

fromInteger :: Integer -> Idx (XN m) #

KnownDim n => Num (Idx (N n)) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(+) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

(-) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

(*) :: Idx (N n) -> Idx (N n) -> Idx (N n) #

negate :: Idx (N n) -> Idx (N n) #

abs :: Idx (N n) -> Idx (N n) #

signum :: Idx (N n) -> Idx (N n) #

fromInteger :: Integer -> Idx (N n) #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

Ord (Dim x) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dim x -> Dim x -> Ordering #

(<) :: Dim x -> Dim x -> Bool #

(<=) :: Dim x -> Dim x -> Bool #

(>) :: Dim x -> Dim x -> Bool #

(>=) :: Dim x -> Dim x -> Bool #

max :: Dim x -> Dim x -> Dim x #

min :: Dim x -> Dim x -> Dim x #

(Dimensions xns, KnownBackends ts (DimsBound xns), Bounded (DataFrame ts (DimsBound xns))) => Bounded (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

minBound :: DataFrame ts xns #

maxBound :: DataFrame ts xns #

(Enum (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat])) => Enum (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

succ :: DataFrame ts '[] -> DataFrame ts '[] #

pred :: DataFrame ts '[] -> DataFrame ts '[] #

toEnum :: Int -> DataFrame ts '[] #

fromEnum :: DataFrame ts '[] -> Int #

enumFrom :: DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromThen :: DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromTo :: DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

enumFromThenTo :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] -> [DataFrame ts '[]] #

All Eq ts => Eq (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

(/=) :: DataFrame ts ds -> DataFrame ts ds -> Bool #

Eq t => Eq (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(==) :: DataFrame t ds -> DataFrame t ds -> Bool #

(/=) :: DataFrame t ds -> DataFrame t ds -> Bool #

(Dimensions xns, KnownBackends ts (DimsBound xns), Floating (DataFrame ts (DimsBound xns))) => Floating (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

pi :: DataFrame ts xns #

exp :: DataFrame ts xns -> DataFrame ts xns #

log :: DataFrame ts xns -> DataFrame ts xns #

sqrt :: DataFrame ts xns -> DataFrame ts xns #

(**) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

logBase :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

sin :: DataFrame ts xns -> DataFrame ts xns #

cos :: DataFrame ts xns -> DataFrame ts xns #

tan :: DataFrame ts xns -> DataFrame ts xns #

asin :: DataFrame ts xns -> DataFrame ts xns #

acos :: DataFrame ts xns -> DataFrame ts xns #

atan :: DataFrame ts xns -> DataFrame ts xns #

sinh :: DataFrame ts xns -> DataFrame ts xns #

cosh :: DataFrame ts xns -> DataFrame ts xns #

tanh :: DataFrame ts xns -> DataFrame ts xns #

asinh :: DataFrame ts xns -> DataFrame ts xns #

acosh :: DataFrame ts xns -> DataFrame ts xns #

atanh :: DataFrame ts xns -> DataFrame ts xns #

log1p :: DataFrame ts xns -> DataFrame ts xns #

expm1 :: DataFrame ts xns -> DataFrame ts xns #

log1pexp :: DataFrame ts xns -> DataFrame ts xns #

log1mexp :: DataFrame ts xns -> DataFrame ts xns #

(Dimensions xns, KnownBackends ts (DimsBound xns), Fractional (DataFrame ts (DimsBound xns))) => Fractional (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(/) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

recip :: DataFrame ts xns -> DataFrame ts xns #

fromRational :: Rational -> DataFrame ts xns #

(Integral (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Integral (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

quot :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

rem :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

div :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

mod :: DataFrame ts '[] -> DataFrame ts '[] -> DataFrame ts '[] #

quotRem :: DataFrame ts '[] -> DataFrame ts '[] -> (DataFrame ts '[], DataFrame ts '[]) #

divMod :: DataFrame ts '[] -> DataFrame ts '[] -> (DataFrame ts '[], DataFrame ts '[]) #

toInteger :: DataFrame ts '[] -> Integer #

(Dimensions xns, KnownBackends ts (DimsBound xns), Num (DataFrame ts (DimsBound xns))) => Num (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

(+) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(-) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(*) :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

negate :: DataFrame ts xns -> DataFrame ts xns #

abs :: DataFrame ts xns -> DataFrame ts xns #

signum :: DataFrame ts xns -> DataFrame ts xns #

fromInteger :: Integer -> DataFrame ts xns #

(xns ~ Map 'N (DimsBound xns), Eq (DataFrame ts xns), Ord (DataFrame ts (DimsBound xns))) => Ord (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

compare :: DataFrame ts xns -> DataFrame ts xns -> Ordering #

(<) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(<=) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(>) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

(>=) :: DataFrame ts xns -> DataFrame ts xns -> Bool #

max :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

min :: DataFrame ts xns -> DataFrame ts xns -> DataFrame ts xns #

(All Read ts, All PrimBytes ts, RepresentableList ts, BoundedDims ds, All (KnownDimType :: XNat -> Constraint) ds) => Read (DataFrame ts ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Read t, PrimBytes t, BoundedDims ds, All (KnownDimType :: XNat -> Constraint) ds) => Read (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

(Real (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Real (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

toRational :: DataFrame ts '[] -> Rational #

(RealFloat (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFloat (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

floatRadix :: DataFrame t '[] -> Integer #

floatDigits :: DataFrame t '[] -> Int #

floatRange :: DataFrame t '[] -> (Int, Int) #

decodeFloat :: DataFrame t '[] -> (Integer, Int) #

encodeFloat :: Integer -> Int -> DataFrame t '[] #

exponent :: DataFrame t '[] -> Int #

significand :: DataFrame t '[] -> DataFrame t '[] #

scaleFloat :: Int -> DataFrame t '[] -> DataFrame t '[] #

isNaN :: DataFrame t '[] -> Bool #

isInfinite :: DataFrame t '[] -> Bool #

isDenormalized :: DataFrame t '[] -> Bool #

isNegativeZero :: DataFrame t '[] -> Bool #

isIEEE :: DataFrame t '[] -> Bool #

atan2 :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] #

(RealFrac (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFrac (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

properFraction :: Integral b => DataFrame t '[] -> (b, DataFrame t '[]) #

truncate :: Integral b => DataFrame t '[] -> b #

round :: Integral b => DataFrame t '[] -> b #

ceiling :: Integral b => DataFrame t '[] -> b #

floor :: Integral b => DataFrame t '[] -> b #

(All Show ts, All PrimBytes ts) => Show (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame ts xns -> ShowS #

show :: DataFrame ts xns -> String #

showList :: [DataFrame ts xns] -> ShowS #

(Show t, PrimBytes t) => Show (DataFrame t xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

showsPrec :: Int -> DataFrame t xns -> ShowS #

show :: DataFrame t xns -> String #

showList :: [DataFrame t xns] -> ShowS #

(Dimensions xns, KnownBackends ts (DimsBound xns), PrimBytes (DataFrame ts (DimsBound xns))) => PrimBytes (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame ts xns) :: [Symbol] Source #

(RealFloatExtras (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealFloatExtras (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

hypot :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] Source #

maxFinite :: DataFrame t '[] Source #

(RealExtras (DataFrame t ('[] :: [Nat])), KnownBackend t ('[] :: [Nat]), Eq t) => RealExtras (DataFrame t ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

copysign :: DataFrame t '[] -> DataFrame t '[] -> DataFrame t '[] Source #

(Epsilon (DataFrame ts ('[] :: [Nat])), KnownBackends ts ('[] :: [Nat]), Eq (DataFrame ts ('[] :: [XNat]))) => Epsilon (DataFrame ts ('[] :: [XNat])) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

epsilon :: DataFrame ts '[] Source #

(xns ~ Map 'N (DimsBound xns), ProductOrder (DataFrame ts (DimsBound xns))) => ProductOrder (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

cmp :: DataFrame ts xns -> DataFrame ts xns -> PartialOrdering Source #

data DataFrame (ts :: l) (xns :: [XNat]) Source #

Data frame with some dimensions missing at compile time. Pattern-match against its constructor to get a Nat-indexed data frame.

Instance details

Defined in Numeric.DataFrame.Type

data DataFrame (ts :: l) (xns :: [XNat]) = (All (KnownDimType :: XNat -> Constraint) xns, FixedDims xns ns, Dimensions ns, KnownBackends ts ns) => XFrame (DataFrame ts ns)
type SubSpaceCtx t (as :: [XNat]) (bs :: [XNat]) (asbs :: [XNat]) Source # 
Instance details

Defined in Numeric.DataFrame.SubSpace

type SubSpaceCtx t (as :: [XNat]) (bs :: [XNat]) (asbs :: [XNat]) = (Dimensions bs, PrimBytes t, ExactDims bs, All (KnownDimType :: XNat -> Constraint) as, All (KnownDimType :: XNat -> Constraint) bs, All (KnownDimType :: XNat -> Constraint) asbs)
type DimBound ('XN m :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

type DimBound ('XN m :: XNat) = m
type DimBound (N n :: XNat) 
Instance details

Defined in Numeric.Dimensions.Dim

type DimBound (N n :: XNat) = n
type PrimFields (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

type N = 'N #

Known natural number

type XN = 'XN #

Unknown natural number, known to be not smaller than the given Nat

type Dims = TypedList (Dim :: k -> Type) #

Type-level dimensionality.

type Idxs = TypedList (Idx :: k -> Type) #

Type-level dimensional indexing with arbitrary Word values inside. Most of the operations on it require Dimensions or BoundedDims constraint, because the Idxs itself does not store info about dimension bounds.

data TypedList (f :: k -> Type) (xs :: [k]) where #

Type-indexed list

Bundled Patterns

pattern Empty :: () => xs ~ ('[] :: [k]) => TypedList f xs

Zero-length type list; synonym to U.

pattern Reverse :: forall k f xs sx. () => ReverseList xs sx => TypedList f sx -> TypedList f xs

Reverse a typed list

pattern Snoc :: forall k f xs sy (y :: k). () => SnocList sy y xs => TypedList f sy -> f y -> TypedList f xs

Constructing a type-indexed list from the other end

pattern Cons :: forall k f xs (y :: k) ys. () => xs ~ (y ': ys) => f y -> TypedList f ys -> TypedList f xs

Constructing a type-indexed list in the canonical way

pattern TypeList :: () => RepresentableList xs => TypeList xs

Pattern matching against this causes RepresentableList instance come into scope. Also it allows constructing a term-level list out of a constraint.

pattern (:*) :: forall k f xs (y :: k) ys. () => xs ~ (y ': ys) => f y -> TypedList f ys -> TypedList f xs infixr 5

Constructing a type-indexed list

pattern U :: () => xs ~ ('[] :: [k]) => TypedList f xs

Zero-length type list

pattern Dims :: forall k ds (ns :: [Nat]). KnownDimKind (KindOfEl ds) => forall. (ds ~~ ns, Dimensions ns) => Dims ds

O(1) Pattern-matching against this constructor brings a Dimensions instance into the scope. Thus, you can do arbitrary operations on your dims and use this pattern at any time to reconstruct the class instance at runtime.

pattern KnownDims :: () => (All (KnownDim :: Nat -> Constraint) ds, All (BoundedDim :: Nat -> Constraint) ds, RepresentableList ds, Dimensions ds) => Dims ds

O(Length ds) A heavy weapon against all sorts of type errors

pattern XDims :: KnownDimKind (KindOfEl ds) => FixedDims ds ns => Dims ns -> Dims ds

O(n) Pattern-matching against this constructor reveals Nat-kinded list of dims, pretending the dimensionality is known at compile time within the scope of the pattern match. This is the main recommended way to get Dims at runtime; for example, reading a list of dimensions from a file.

pattern XIdxs :: (FixedDims ds ns, Dimensions ns) => Idxs ns -> Idxs ds

Transform between Nat-indexed and XNat-indexed Idxs.

Note, this pattern is not a COMPLETE match, because converting from XNat to Nat indexed Idxs may fail (see unliftIdxs).

Instances

Instances details
(RepresentableList xs, All Bounded xs) => Bounded (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

Methods

minBound :: Tuple xs #

maxBound :: Tuple xs #

(RepresentableList xs, All Bounded xs) => Bounded (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

Methods

minBound :: Tuple xs #

maxBound :: Tuple xs #

All Eq xs => Eq (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

Methods

(==) :: Tuple xs -> Tuple xs -> Bool #

(/=) :: Tuple xs -> Tuple xs -> Bool #

All Eq xs => Eq (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

Methods

(==) :: Tuple xs -> Tuple xs -> Bool #

(/=) :: Tuple xs -> Tuple xs -> Bool #

All Ord (Map f xs) => Eq (ProductOrd (TypedList f xs)) Source # 
Instance details

Defined in Numeric.ProductOrd.Partial

Methods

(==) :: ProductOrd (TypedList f xs) -> ProductOrd (TypedList f xs) -> Bool #

(/=) :: ProductOrd (TypedList f xs) -> ProductOrd (TypedList f xs) -> Bool #

(All Eq xs, All Ord xs) => Ord (Tuple xs)

Lexicorgaphic ordering; same as normal Haskell lists.

Instance details

Defined in Numeric.Tuple.Lazy

Methods

compare :: Tuple xs -> Tuple xs -> Ordering #

(<) :: Tuple xs -> Tuple xs -> Bool #

(<=) :: Tuple xs -> Tuple xs -> Bool #

(>) :: Tuple xs -> Tuple xs -> Bool #

(>=) :: Tuple xs -> Tuple xs -> Bool #

max :: Tuple xs -> Tuple xs -> Tuple xs #

min :: Tuple xs -> Tuple xs -> Tuple xs #

(All Eq xs, All Ord xs) => Ord (Tuple xs)

Lexicorgaphic ordering; same as normal Haskell lists.

Instance details

Defined in Numeric.Tuple.Strict

Methods

compare :: Tuple xs -> Tuple xs -> Ordering #

(<) :: Tuple xs -> Tuple xs -> Bool #

(<=) :: Tuple xs -> Tuple xs -> Bool #

(>) :: Tuple xs -> Tuple xs -> Bool #

(>=) :: Tuple xs -> Tuple xs -> Bool #

max :: Tuple xs -> Tuple xs -> Tuple xs #

min :: Tuple xs -> Tuple xs -> Tuple xs #

All Ord (Map f xs) => Ord (ProductOrd (TypedList f xs)) Source # 
Instance details

Defined in Numeric.ProductOrd.NonTransitive

All Ord (Map f xs) => Ord (ProductOrd (TypedList f xs)) Source # 
Instance details

Defined in Numeric.ProductOrd.Partial

(All Read xs, RepresentableList xs) => Read (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

(All Read xs, RepresentableList xs) => Read (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

All Show xs => Show (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

Methods

showsPrec :: Int -> Tuple xs -> ShowS #

show :: Tuple xs -> String #

showList :: [Tuple xs] -> ShowS #

All Show xs => Show (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

Methods

showsPrec :: Int -> Tuple xs -> ShowS #

show :: Tuple xs -> String #

showList :: [Tuple xs] -> ShowS #

All Semigroup xs => Semigroup (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

Methods

(<>) :: Tuple xs -> Tuple xs -> Tuple xs #

sconcat :: NonEmpty (Tuple xs) -> Tuple xs #

stimes :: Integral b => b -> Tuple xs -> Tuple xs #

All Semigroup xs => Semigroup (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

Methods

(<>) :: Tuple xs -> Tuple xs -> Tuple xs #

sconcat :: NonEmpty (Tuple xs) -> Tuple xs #

stimes :: Integral b => b -> Tuple xs -> Tuple xs #

(RepresentableList xs, All Semigroup xs, All Monoid xs) => Monoid (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Lazy

Methods

mempty :: Tuple xs #

mappend :: Tuple xs -> Tuple xs -> Tuple xs #

mconcat :: [Tuple xs] -> Tuple xs #

(RepresentableList xs, All Semigroup xs, All Monoid xs) => Monoid (Tuple xs) 
Instance details

Defined in Numeric.Tuple.Strict

Methods

mempty :: Tuple xs #

mappend :: Tuple xs -> Tuple xs -> Tuple xs #

mconcat :: [Tuple xs] -> Tuple xs #

(RepresentableList xs, All PrimBytes xs) => PrimBytes (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Tuple xs) :: [Symbol] Source #

(RepresentableList xs, All PrimBytes xs) => PrimBytes (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Tuple xs) :: [Symbol] Source #

BoundedDims ds => Bounded (Idxs ds) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

minBound :: Idxs ds #

maxBound :: Idxs ds #

Dimensions ds => Enum (Idxs ds)

ds must be fixed (either [Nat] or all (N n)) to know exact bounds in each dimension.

Instance details

Defined in Numeric.Dimensions.Idx

Methods

succ :: Idxs ds -> Idxs ds #

pred :: Idxs ds -> Idxs ds #

toEnum :: Int -> Idxs ds #

fromEnum :: Idxs ds -> Int #

enumFrom :: Idxs ds -> [Idxs ds] #

enumFromThen :: Idxs ds -> Idxs ds -> [Idxs ds] #

enumFromTo :: Idxs ds -> Idxs ds -> [Idxs ds] #

enumFromThenTo :: Idxs ds -> Idxs ds -> Idxs ds -> [Idxs ds] #

Eq (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

(==) :: Idxs xs -> Idxs xs -> Bool #

(/=) :: Idxs xs -> Idxs xs -> Bool #

Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Eq (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

(==) :: Dims ds -> Dims ds -> Bool #

(/=) :: Dims ds -> Dims ds -> Bool #

Ord (Idxs xs)

Compare indices by their importance in lexicorgaphic order from the first dimension to the last dimension (the first dimension is the most significant one).

Literally,

compare a b = compare (listIdxs a) (listIdxs b)

This is the same compare rule, as for Dims. This is also consistent with offsets:

sort == sortOn fromEnum
Instance details

Defined in Numeric.Dimensions.Idx

Methods

compare :: Idxs xs -> Idxs xs -> Ordering #

(<) :: Idxs xs -> Idxs xs -> Bool #

(<=) :: Idxs xs -> Idxs xs -> Bool #

(>) :: Idxs xs -> Idxs xs -> Bool #

(>=) :: Idxs xs -> Idxs xs -> Bool #

max :: Idxs xs -> Idxs xs -> Idxs xs #

min :: Idxs xs -> Idxs xs -> Idxs xs #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

Ord (Dims ds) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

compare :: Dims ds -> Dims ds -> Ordering #

(<) :: Dims ds -> Dims ds -> Bool #

(<=) :: Dims ds -> Dims ds -> Bool #

(>) :: Dims ds -> Dims ds -> Bool #

(>=) :: Dims ds -> Dims ds -> Bool #

max :: Dims ds -> Dims ds -> Dims ds #

min :: Dims ds -> Dims ds -> Dims ds #

BoundedDims xs => Read (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

BoundedDims xs => Read (Dims xs) 
Instance details

Defined in Numeric.Dimensions.Dim

Show (Idxs xs) 
Instance details

Defined in Numeric.Dimensions.Idx

Methods

showsPrec :: Int -> Idxs xs -> ShowS #

show :: Idxs xs -> String #

showList :: [Idxs xs] -> ShowS #

Show (Dims xs) 
Instance details

Defined in Numeric.Dimensions.Dim

Methods

showsPrec :: Int -> Dims xs -> ShowS #

show :: Dims xs -> String #

showList :: [Dims xs] -> ShowS #

RepresentableList xs => PrimBytes (Idxs xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Idxs xs) :: [Symbol] Source #

(Typeable k, Typeable f, Typeable xs, All Data (Map f xs)) => Data (TypedList f xs)

Term-level structure of a TypedList f xs is fully determined by its type Typeable xs. Thus, gunfold does not use its last argument (Constr) at all, relying on the structure of the type parameter.

Instance details

Defined in Numeric.TypedList

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypedList f xs -> c (TypedList f xs) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TypedList f xs) #

toConstr :: TypedList f xs -> Constr #

dataTypeOf :: TypedList f xs -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TypedList f xs)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TypedList f xs)) #

gmapT :: (forall b. Data b => b -> b) -> TypedList f xs -> TypedList f xs #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypedList f xs -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypedList f xs -> r #

gmapQ :: (forall d. Data d => d -> u) -> TypedList f xs -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TypedList f xs -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypedList f xs -> m (TypedList f xs) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypedList f xs -> m (TypedList f xs) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypedList f xs -> m (TypedList f xs) #

Generic (TypedList f xs) 
Instance details

Defined in Numeric.TypedList

Associated Types

type Rep (TypedList f xs) :: Type -> Type #

Methods

from :: TypedList f xs -> Rep (TypedList f xs) x #

to :: Rep (TypedList f xs) x -> TypedList f xs #

All Ord (Map f xs) => ProductOrder (TypedList f xs) Source # 
Instance details

Defined in Numeric.ProductOrd

Methods

cmp :: TypedList f xs -> TypedList f xs -> PartialOrdering Source #

type PrimFields (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

type PrimFields (Tuple xs)
type PrimFields (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

type PrimFields (Tuple xs)
type PrimFields (Idxs xs) Source # 
Instance details

Defined in Numeric.PrimBytes

type PrimFields (Idxs xs) = '[] :: [Symbol]
type Rep (TypedList f xs) 
Instance details

Defined in Numeric.TypedList

type Rep (TypedList f xs) = D1 ('MetaData "TypedList" "Numeric.TypedList" "dimensions" 'False) (TypedListRepNil xs :+: TypedListRepCons f xs)

class PrimTagged a => PrimBytes a Source #

Defines how to read and write your data to and from Haskell unboxed byte arrays and plain pointers.

Similarly to Storable, this class provides functions to get the size and alignment of a data via phantom arguments. Thus, the size and alignment of the data must not depend on the data content (they depend only on the type of the data). In particular, this means that dynamically sized structures like Haskell lists or maps are not allowed.

This module provides default implementations for all methods of this class via Generic. Hence, to make your data an instance of PrimBytes, it is sufficient to write the instance head:

data MyData a b = ...
  deriving Generic

instance (PrimBytes a, PrimBytes b) => PrimBytes (MyData a b)

.. or use the DeriveAnyClass extension to make it even shorter:

data MyData a b = ...
  deriving (Generic, PrimBytes)

The derived instance tries to pack the data as dense as possible, but sometimes it is better to write the instance by hand. If a derived type has more than one constructor, the derived instance puts a Word32 tag at the beginning of the byte representation. All fields of a constructor are packed in a C-like fashion next to each other, while respecting their alignments.

Instances

Instances details
PrimBytes Char Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Char :: [Symbol] Source #

PrimBytes Double Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Double :: [Symbol] Source #

PrimBytes Float Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Float :: [Symbol] Source #

PrimBytes Int Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Int :: [Symbol] Source #

PrimBytes Int8 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Int8 :: [Symbol] Source #

PrimBytes Int16 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Int16 :: [Symbol] Source #

PrimBytes Int32 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Int32 :: [Symbol] Source #

PrimBytes Int64 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Int64 :: [Symbol] Source #

PrimBytes Word Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Word :: [Symbol] Source #

PrimBytes Word8 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Word8 :: [Symbol] Source #

PrimBytes Word16 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Word16 :: [Symbol] Source #

PrimBytes Word32 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Word32 :: [Symbol] Source #

PrimBytes Word64 Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields Word64 :: [Symbol] Source #

PrimBytes () Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields () :: [Symbol] Source #

Methods

getBytes :: () -> ByteArray# Source #

getBytesPinned :: () -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> () Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, () #) Source #

writeBytes :: MutableByteArray# s -> Int# -> () -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, () #) Source #

writeAddr :: () -> Addr# -> State# s -> State# s Source #

byteSize :: () -> Int# Source #

byteAlign :: () -> Int# Source #

byteOffset :: () -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields ()), KnownSymbol name) => Proxy# name -> () -> Int# Source #

indexArray :: ByteArray# -> Int# -> () Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, () #) Source #

writeArray :: MutableByteArray# s -> Int# -> () -> State# s -> State# s Source #

PrimBytes CChar Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CChar :: [Symbol] Source #

PrimBytes CSChar Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CSChar :: [Symbol] Source #

PrimBytes CUChar Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUChar :: [Symbol] Source #

PrimBytes CShort Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CShort :: [Symbol] Source #

PrimBytes CUShort Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUShort :: [Symbol] Source #

PrimBytes CInt Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CInt :: [Symbol] Source #

PrimBytes CUInt Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUInt :: [Symbol] Source #

PrimBytes CLong Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CLong :: [Symbol] Source #

PrimBytes CULong Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CULong :: [Symbol] Source #

PrimBytes CLLong Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CLLong :: [Symbol] Source #

PrimBytes CULLong Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CULLong :: [Symbol] Source #

PrimBytes CBool Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CBool :: [Symbol] Source #

PrimBytes CFloat Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CFloat :: [Symbol] Source #

PrimBytes CDouble Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CDouble :: [Symbol] Source #

PrimBytes CPtrdiff Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CPtrdiff :: [Symbol] Source #

PrimBytes CSize Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CSize :: [Symbol] Source #

PrimBytes CWchar Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CWchar :: [Symbol] Source #

PrimBytes CSigAtomic Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CSigAtomic :: [Symbol] Source #

PrimBytes CClock Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CClock :: [Symbol] Source #

PrimBytes CTime Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CTime :: [Symbol] Source #

PrimBytes CUSeconds Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUSeconds :: [Symbol] Source #

PrimBytes CSUSeconds Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CSUSeconds :: [Symbol] Source #

PrimBytes CIntPtr Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CIntPtr :: [Symbol] Source #

PrimBytes CUIntPtr Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUIntPtr :: [Symbol] Source #

PrimBytes CIntMax Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CIntMax :: [Symbol] Source #

PrimBytes CUIntMax Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields CUIntMax :: [Symbol] Source #

PrimBytes a => PrimBytes (Maybe a) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Maybe a) :: [Symbol] Source #

PrimBytes (StablePtr a) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (StablePtr a) :: [Symbol] Source #

PrimBytes (Ptr a) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Ptr a) :: [Symbol] Source #

PrimBytes (FunPtr a) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (FunPtr a) :: [Symbol] Source #

(RepresentableList xs, All PrimBytes xs) => PrimBytes (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Tuple xs) :: [Symbol] Source #

(RepresentableList xs, All PrimBytes xs) => PrimBytes (Tuple xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Tuple xs) :: [Symbol] Source #

PrimBytes (Quater Double) Source # 
Instance details

Defined in Numeric.Quaternion.Internal.QDouble

Associated Types

type PrimFields (Quater Double) :: [Symbol] Source #

PrimBytes (Quater Float) Source # 
Instance details

Defined in Numeric.Quaternion.Internal.QFloat

Associated Types

type PrimFields (Quater Float) :: [Symbol] Source #

(PrimBytes a, PrimBytes b) => PrimBytes (Either a b) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Either a b) :: [Symbol] Source #

(PrimBytes a, PrimBytes b) => PrimBytes (a, b) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b) :: [Symbol] Source #

Methods

getBytes :: (a, b) -> ByteArray# Source #

getBytesPinned :: (a, b) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b) #) Source #

writeAddr :: (a, b) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b) -> Int# Source #

byteAlign :: (a, b) -> Int# Source #

byteOffset :: (a, b) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b)), KnownSymbol name) => Proxy# name -> (a, b) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b) -> State# s -> State# s Source #

PrimBytes (Idx x) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Idx x) :: [Symbol] Source #

RepresentableList xs => PrimBytes (Idxs xs) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (Idxs xs) :: [Symbol] Source #

(PrimBytes a, PrimBytes b, PrimBytes c) => PrimBytes (a, b, c) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b, c) :: [Symbol] Source #

Methods

getBytes :: (a, b, c) -> ByteArray# Source #

getBytesPinned :: (a, b, c) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b, c) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b, c) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b, c) #) Source #

writeAddr :: (a, b, c) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b, c) -> Int# Source #

byteAlign :: (a, b, c) -> Int# Source #

byteOffset :: (a, b, c) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b, c)), KnownSymbol name) => Proxy# name -> (a, b, c) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b, c) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b, c) -> State# s -> State# s Source #

(PrimBytes a, PrimBytes b, PrimBytes c, PrimBytes d) => PrimBytes (a, b, c, d) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b, c, d) :: [Symbol] Source #

Methods

getBytes :: (a, b, c, d) -> ByteArray# Source #

getBytesPinned :: (a, b, c, d) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b, c, d) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b, c, d) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b, c, d) #) Source #

writeAddr :: (a, b, c, d) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b, c, d) -> Int# Source #

byteAlign :: (a, b, c, d) -> Int# Source #

byteOffset :: (a, b, c, d) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b, c, d)), KnownSymbol name) => Proxy# name -> (a, b, c, d) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b, c, d) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b, c, d) -> State# s -> State# s Source #

PrimBytes (DFBackend t ds) => PrimBytes (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame t ds) :: [Symbol] Source #

(Dimensions xns, KnownBackends ts (DimsBound xns), PrimBytes (DataFrame ts (DimsBound xns))) => PrimBytes (DataFrame ts xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Associated Types

type PrimFields (DataFrame ts xns) :: [Symbol] Source #

(PrimBytes a, PrimBytes b, PrimBytes c, PrimBytes d, PrimBytes e) => PrimBytes (a, b, c, d, e) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b, c, d, e) :: [Symbol] Source #

Methods

getBytes :: (a, b, c, d, e) -> ByteArray# Source #

getBytesPinned :: (a, b, c, d, e) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b, c, d, e) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b, c, d, e) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b, c, d, e) #) Source #

writeAddr :: (a, b, c, d, e) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b, c, d, e) -> Int# Source #

byteAlign :: (a, b, c, d, e) -> Int# Source #

byteOffset :: (a, b, c, d, e) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b, c, d, e)), KnownSymbol name) => Proxy# name -> (a, b, c, d, e) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b, c, d, e) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b, c, d, e) -> State# s -> State# s Source #

(PrimBytes a, PrimBytes b, PrimBytes c, PrimBytes d, PrimBytes e, PrimBytes f) => PrimBytes (a, b, c, d, e, f) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b, c, d, e, f) :: [Symbol] Source #

Methods

getBytes :: (a, b, c, d, e, f) -> ByteArray# Source #

getBytesPinned :: (a, b, c, d, e, f) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b, c, d, e, f) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e, f) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b, c, d, e, f) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b, c, d, e, f) #) Source #

writeAddr :: (a, b, c, d, e, f) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b, c, d, e, f) -> Int# Source #

byteAlign :: (a, b, c, d, e, f) -> Int# Source #

byteOffset :: (a, b, c, d, e, f) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b, c, d, e, f)), KnownSymbol name) => Proxy# name -> (a, b, c, d, e, f) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b, c, d, e, f) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e, f) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b, c, d, e, f) -> State# s -> State# s Source #

(PrimBytes a, PrimBytes b, PrimBytes c, PrimBytes d, PrimBytes e, PrimBytes f, PrimBytes g) => PrimBytes (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Numeric.PrimBytes

Associated Types

type PrimFields (a, b, c, d, e, f, g) :: [Symbol] Source #

Methods

getBytes :: (a, b, c, d, e, f, g) -> ByteArray# Source #

getBytesPinned :: (a, b, c, d, e, f, g) -> ByteArray# Source #

fromBytes :: Int# -> ByteArray# -> (a, b, c, d, e, f, g) Source #

readBytes :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e, f, g) #) Source #

writeBytes :: MutableByteArray# s -> Int# -> (a, b, c, d, e, f, g) -> State# s -> State# s Source #

readAddr :: Addr# -> State# s -> (# State# s, (a, b, c, d, e, f, g) #) Source #

writeAddr :: (a, b, c, d, e, f, g) -> Addr# -> State# s -> State# s Source #

byteSize :: (a, b, c, d, e, f, g) -> Int# Source #

byteAlign :: (a, b, c, d, e, f, g) -> Int# Source #

byteOffset :: (a, b, c, d, e, f, g) -> Int# Source #

byteFieldOffset :: forall (name :: Symbol). (Elem name (PrimFields (a, b, c, d, e, f, g)), KnownSymbol name) => Proxy# name -> (a, b, c, d, e, f, g) -> Int# Source #

indexArray :: ByteArray# -> Int# -> (a, b, c, d, e, f, g) Source #

readArray :: MutableByteArray# s -> Int# -> State# s -> (# State# s, (a, b, c, d, e, f, g) #) Source #

writeArray :: MutableByteArray# s -> Int# -> (a, b, c, d, e, f, g) -> State# s -> State# s Source #

bSizeOf :: (PrimBytes a, Num b) => a -> b Source #

A wrapper on byteSize

bAlignOf :: (PrimBytes a, Num b) => a -> b Source #

A wrapper on byteAlign

bFieldOffsetOf :: forall (name :: Symbol) (a :: Type) (b :: Type). (PrimBytes a, Elem name (PrimFields a), KnownSymbol name, Num b) => a -> b Source #

A wrapper on byteFieldOffset.

class PrimBytes t => PrimArray t a | a -> t Source #

Minimal complete definition

broadcast#, gen#, upd#, withArrayContent#, fromElems#

Instances

Instances details
PrimArray Double (Quater Double) Source # 
Instance details

Defined in Numeric.Quaternion.Internal.QDouble

PrimArray Float (Quater Float) Source # 
Instance details

Defined in Numeric.Quaternion.Internal.QFloat

(Dimensions xns, KnownBackend t (DimsBound xns), PrimArray t (DataFrame t (DimsBound xns)), PrimBytes t) => PrimArray t (DataFrame t xns) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t xns Source #

ix# :: Int# -> DataFrame t xns -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t xns #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t xns -> DataFrame t xns Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t xns -> r Source #

offsetElems :: DataFrame t xns -> Int# Source #

uniqueOrCumulDims :: DataFrame t xns -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t xns Source #

(PrimArray t (DFBackend t ds), PrimBytes t) => PrimArray t (DataFrame t ds) Source # 
Instance details

Defined in Numeric.DataFrame.Type

Methods

broadcast# :: t -> DataFrame t ds Source #

ix# :: Int# -> DataFrame t ds -> t Source #

gen# :: CumulDims -> (s -> (# s, t #)) -> s -> (# s, DataFrame t ds #) Source #

upd# :: CumulDims -> Int# -> t -> DataFrame t ds -> DataFrame t ds Source #

withArrayContent# :: forall (rep :: RuntimeRep) (r :: TYPE rep). (t -> r) -> (CumulDims -> Int# -> ByteArray# -> r) -> DataFrame t ds -> r Source #

offsetElems :: DataFrame t ds -> Int# Source #

uniqueOrCumulDims :: DataFrame t ds -> Either t CumulDims Source #

fromElems# :: CumulDims -> Int# -> ByteArray# -> DataFrame t ds Source #

ixOff :: PrimArray t a => Int -> a -> t Source #

Index array by an integer offset (starting from 0).