Copyright | Christof Schramm |
---|---|
License | GPLv3 |
Maintainer | Christof Schramm <christof.schramm@campus.lmu.de> |
Stability | Experimental |
Portability | Shoud work with all major haskell implementations |
Safe Haskell | None |
Language | Haskell2010 |
An internal package, the API contained here should not be used and is subject to possibly breaking changes. Use these functions and types at your own risk.
The safe interface is in IDX
- data IDXContentType where
- data IDXData
- = IDXInts IDXContentType (Vector Int) (Vector Int)
- | IDXDoubles IDXContentType (Vector Int) (Vector Double)
- newtype IDXLabels = IDXLabels (Vector Int)
- idxType :: IDXData -> IDXContentType
- idxDimensions :: IDXData -> Vector Int
- isIDXIntegral :: IDXData -> Bool
- isIDXReal :: IDXData -> Bool
- idxIntContent :: IDXData -> Vector Int
- idxDoubleContent :: IDXData -> Vector Double
- readContent :: Unbox a => (Int -> Get (Vector a)) -> Int -> Int -> Get (Vector a)
Documentation
data IDXContentType where Source
A type to describe the content, according to IDX spec
Datatype for storing IDXData. Internally data is always stored either
as Int
or Double
unboxed vectors. However when binary serialization
is used, the data is serialized according to the IDXContentType
.
idxType :: IDXData -> IDXContentType Source
Return the what type the data is stored in
idxDimensions :: IDXData -> Vector Int Source
Return an unboxed Vector of Int dimensions
isIDXIntegral :: IDXData -> Bool Source
Return wether the data in this IDXData value is stored as integral values
isIDXReal :: IDXData -> Bool Source
Return wether the data in this IDXData value is stored as double values
idxIntContent :: IDXData -> Vector Int Source
Return contained ints, if no ints are contained,
convert content to ints by using round
. Data is stored like
in a C-array, i.e. the last index changes first.
idxDoubleContent :: IDXData -> Vector Double Source
Return contained doubles, if no doubles are contained
convert the content to double by using fromIntegral
. Data is stored like
in a C-array, i.e. the last index changes first.