easytensor-0.4.0.0: Pure, type-indexed haskell vector, matrix, and tensor library.

Copyright(c) Artem Chirkin
LicenseBSD3
Maintainerchirkin@arch.ethz.ch
Safe HaskellNone
LanguageHaskell2010

Numeric.Commons

Description

 

Synopsis

Documentation

type family ElemPrim a :: TYPE (r :: RuntimeRep) Source #

Instances

type ElemPrim IntRep Int Source # 
type ElemPrim IntRep Int8 Source # 
type ElemPrim IntRep Int16 Source # 
type ElemPrim IntRep Int32 Source # 
type ElemPrim IntRep Int64 Source # 
type ElemPrim WordRep Word Source # 
type ElemPrim WordRep Word8 Source # 
type ElemPrim WordRep Word16 Source # 
type ElemPrim WordRep Word32 Source # 
type ElemPrim WordRep Word64 Source # 
type ElemPrim FloatRep Float Source # 
type ElemPrim DoubleRep Double Source # 
type ElemPrim IntRep (DataFrame k Int64 ds) Source # 
type ElemPrim IntRep (DataFrame k Int32 ds) Source # 
type ElemPrim IntRep (DataFrame k Int16 ds) Source # 
type ElemPrim IntRep (DataFrame k Int8 ds) Source # 
type ElemPrim IntRep (DataFrame k Int ds) Source # 
type ElemPrim WordRep (DataFrame k Word64 ds) Source # 
type ElemPrim WordRep (DataFrame k Word32 ds) Source # 
type ElemPrim WordRep (DataFrame k Word16 ds) Source # 
type ElemPrim WordRep (DataFrame k Word8 ds) Source # 
type ElemPrim WordRep (DataFrame k Word ds) Source # 
type ElemPrim FloatRep (DataFrame k Float ds) Source # 
type ElemPrim DoubleRep (DataFrame k Double ds) Source # 

class PrimBytes a where Source #

Facilities to convert to and from raw byte array. Warning! offsets and sizes are in elements, not in bytes! Therefore one must be really carefull if having a crazy idea of converting between types of different element sizes.

Minimal complete definition

toBytes, fromBytes, byteSize, byteAlign, elementByteSize, ix

Methods

toBytes :: a -> (#Int#, Int#, ByteArray##) Source #

Store content of a data type in a primitive byte array (ElementOffset, NumberOfElements, ByteArrayContent )

fromBytes :: (#Int#, Int#, ByteArray##) -> a Source #

Load content of a data type from a primitive byte array (ElementOffset, NumberOfElements, ByteArrayContent )

byteSize :: a -> Int# Source #

Size of a data type in bytes

byteAlign :: a -> Int# Source #

Alignment of a data type in bytes

elementByteSize :: a -> Int# Source #

Size of a conainer type elements in bytes

ix :: Int# -> a -> (ElemPrim a :: TYPE (ElemRep a)) Source #

Primitive indexing

Instances

PrimBytes Double Source # 
PrimBytes Float Source # 
PrimBytes Int Source # 
PrimBytes Int8 Source # 
PrimBytes Int16 Source # 
PrimBytes Int32 Source # 
PrimBytes Int64 Source # 
PrimBytes Word Source # 
PrimBytes Word8 Source # 
PrimBytes Word16 Source # 
PrimBytes Word32 Source # 
PrimBytes Word64 Source # 
(PrimBytes (Array Double ds), (~) (TYPE DoubleRep) (ElemPrim DoubleRep (Array Double ds)) Double#, (~) RuntimeRep (ElemRep (Array Double ds)) DoubleRep) => PrimBytes (DataFrame Nat Double ds) Source # 
(PrimBytes (Array Float ds), (~) (TYPE FloatRep) (ElemPrim FloatRep (Array Float ds)) Float#, (~) RuntimeRep (ElemRep (Array Float ds)) FloatRep) => PrimBytes (DataFrame Nat Float ds) Source # 
(PrimBytes (Array Int ds), (~) (TYPE IntRep) (ElemPrim IntRep (Array Int ds)) Int#, (~) RuntimeRep (ElemRep (Array Int ds)) IntRep) => PrimBytes (DataFrame Nat Int ds) Source # 
(PrimBytes (Array Int8 ds), (~) (TYPE IntRep) (ElemPrim IntRep (Array Int8 ds)) Int#, (~) RuntimeRep (ElemRep (Array Int8 ds)) IntRep) => PrimBytes (DataFrame Nat Int8 ds) Source # 
(PrimBytes (Array Int16 ds), (~) (TYPE IntRep) (ElemPrim IntRep (Array Int16 ds)) Int#, (~) RuntimeRep (ElemRep (Array Int16 ds)) IntRep) => PrimBytes (DataFrame Nat Int16 ds) Source # 
(PrimBytes (Array Int32 ds), (~) (TYPE IntRep) (ElemPrim IntRep (Array Int32 ds)) Int#, (~) RuntimeRep (ElemRep (Array Int32 ds)) IntRep) => PrimBytes (DataFrame Nat Int32 ds) Source # 
(PrimBytes (Array Int64 ds), (~) (TYPE IntRep) (ElemPrim IntRep (Array Int64 ds)) Int#, (~) RuntimeRep (ElemRep (Array Int64 ds)) IntRep) => PrimBytes (DataFrame Nat Int64 ds) Source # 
(PrimBytes (Array Word ds), (~) (TYPE WordRep) (ElemPrim WordRep (Array Word ds)) Word#, (~) RuntimeRep (ElemRep (Array Word ds)) WordRep) => PrimBytes (DataFrame Nat Word ds) Source # 
(PrimBytes (Array Word8 ds), (~) (TYPE WordRep) (ElemPrim WordRep (Array Word8 ds)) Word#, (~) RuntimeRep (ElemRep (Array Word8 ds)) WordRep) => PrimBytes (DataFrame Nat Word8 ds) Source # 
(PrimBytes (Array Word16 ds), (~) (TYPE WordRep) (ElemPrim WordRep (Array Word16 ds)) Word#, (~) RuntimeRep (ElemRep (Array Word16 ds)) WordRep) => PrimBytes (DataFrame Nat Word16 ds) Source # 
(PrimBytes (Array Word32 ds), (~) (TYPE WordRep) (ElemPrim WordRep (Array Word32 ds)) Word#, (~) RuntimeRep (ElemRep (Array Word32 ds)) WordRep) => PrimBytes (DataFrame Nat Word32 ds) Source # 
(PrimBytes (Array Word64 ds), (~) (TYPE WordRep) (ElemPrim WordRep (Array Word64 ds)) Word#, (~) RuntimeRep (ElemRep (Array Word64 ds)) WordRep) => PrimBytes (DataFrame Nat Word64 ds) Source #