License | BSD3 |
---|---|
Maintainer | marcin.jan.mrotek@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Repa - HMatrix conversion functions.
- class Element e => Container c e
- class Storable a => Element a
- class HShape sh where
- type HType sh :: * -> *
- toRepa :: Numeric t => HType sh t -> Array F sh t
- fromRepa :: Numeric t => Array F sh t -> HType sh t
- fromRepaS :: Numeric t => Array D sh t -> HType sh t
- fromRepaSIO :: Numeric t => Array D sh t -> IO (HType sh t)
- fromRepaP :: (Numeric t, Monad m) => Array D sh t -> m (HType sh t)
- fromRepaPIO :: Numeric t => Array D sh t -> IO (HType sh t)
- hv2repa :: Storable t => Vector t -> Array F DIM1 t
- repa2hv :: Storable t => Array F DIM1 t -> Vector t
- repa2hvS :: Storable t => Array D DIM1 t -> Vector t
- repa2hvSIO :: Storable t => Array D DIM1 t -> IO (Vector t)
- repa2hvP :: (Storable t, Monad m) => Array D DIM1 t -> m (Vector t)
- repa2hvPIO :: Storable t => Array D DIM1 t -> IO (Vector t)
- hm2repa :: (Storable t, Container Vector t, Element t, Num t) => Matrix t -> Array F DIM2 t
- repa2hm :: Storable t => Array F DIM2 t -> Matrix t
- repa2hmS :: Storable t => Array D DIM2 t -> Matrix t
- repa2hmSIO :: Storable t => Array D DIM2 t -> IO (Matrix t)
- repa2hmP :: (Storable t, Monad m) => Array D DIM2 t -> m (Matrix t)
- repa2hmPIO :: Storable t => Array D DIM2 t -> IO (Matrix t)
Documentation
class Element e => Container c e
Basic element-by-element functions for numeric containers
conj', size', scalar', scale', addConstant, add', sub, mul, equal, cmap', konst', build', atIndex', minIndex', maxIndex', minElement', maxElement', sumElements', prodElements', step', ccompare', cselect', find', assoc', accum', scaleRecip, divide, arctan2', cmod', fromInt', toInt', fromZ', toZ'
Supported matrix elements.
constantD, extractR, setRect, sortI, sortV, compareV, selectV, remapM, rowOp, gemm
Shape-polymorphic conversion.
toRepa :: Numeric t => HType sh t -> Array F sh t Source
fromRepa :: Numeric t => Array F sh t -> HType sh t Source
fromRepaS :: Numeric t => Array D sh t -> HType sh t Source
fromRepaSIO :: Numeric t => Array D sh t -> IO (HType sh t) Source
fromRepaP :: (Numeric t, Monad m) => Array D sh t -> m (HType sh t) Source
fromRepaPIO :: Numeric t => Array D sh t -> IO (HType sh t) Source
Vector conversion utilities
hv2repa :: Storable t => Vector t -> Array F DIM1 t Source
O(1). Convert a HMatrix Vector to a Repa Array.
repa2hv :: Storable t => Array F DIM1 t -> Vector t Source
O(1). Convert a Repa Array to a HMatrix Vector.
repa2hvS :: Storable t => Array D DIM1 t -> Vector t Source
Convert a delayed Repa Array to a HMatrix Vector, evaluating it sequentially.
repa2hvSIO :: Storable t => Array D DIM1 t -> IO (Vector t) Source
O(1). Convert a Repa Array to a HMatrix Vector sequentially inside the IO monad.
repa2hvP :: (Storable t, Monad m) => Array D DIM1 t -> m (Vector t) Source
Convert a delayed Repa Array to a HMatrix Vector, evaluating it in parallel.
repa2hvPIO :: Storable t => Array D DIM1 t -> IO (Vector t) Source
O(1). Convert a Repa Array to a HMatrix Vector in parallel inside the IO monad.
Matrix conversion utilities
hm2repa :: (Storable t, Container Vector t, Element t, Num t) => Matrix t -> Array F DIM2 t Source
O(1). Convert a HMatrix Matrix to a Repa Array.
repa2hm :: Storable t => Array F DIM2 t -> Matrix t Source
O(1). Convert a Repa Array to a HMatrix Matrix.
repa2hmS :: Storable t => Array D DIM2 t -> Matrix t Source
Convert a delayed Repa Array to a HMatrix Matrix, evaluating it sequentially.
repa2hmSIO :: Storable t => Array D DIM2 t -> IO (Matrix t) Source
O(1). Convert a Repa Array to a HMatrix Matrix sequentially inside the IO monad.