Copyright | (c) Justin Le 2018 |
---|---|
License | BSD3 |
Maintainer | justin@jle.im |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Conversions between statically sized types in Numeric.LinearAlgebra.Static from hmatrix and vector-sized.
This module is intentionally minimal, exporting only functions that
cannot be written without "unsafe" operations. With these, however, you
can easily write other useful combinators by using type-safe operations
like fmap
, map
, liftA2
, convert
,
etc.
- rVec :: R n -> Vector n ℝ
- vecR :: Vector n ℝ -> R n
- cVec :: C n -> Vector n ℂ
- vecC :: Vector n ℂ -> C n
- lRows :: forall m n. L m n -> Vector m (R n)
- rowsL :: forall m n. Vector m (R n) -> L m n
- lCols :: forall m n. L m n -> Vector n (R m)
- colsL :: forall m n. Vector n (R m) -> L m n
- mRows :: forall m n. M m n -> Vector m (C n)
- rowsM :: forall m n. Vector m (C n) -> M m n
- mCols :: forall m n. M m n -> Vector n (C m)
- colsM :: forall m n. Vector n (C m) -> M m n
Vector
Real
rVec :: R n -> Vector n ℝ Source #
Convert an hmatrix vector (parameterized by its lenth) to
a vector-sized storable vector of Double
s.
vecR :: Vector n ℝ -> R n Source #
Convert a vector-sized storable vector to an hmatrix vector (parameterized by its lenth).
Complex
cVec :: C n -> Vector n ℂ Source #
Convert an hmatrix complex vector (parameterized by its lenth) to a vector-sized storable vector of 'Complex Double's, preserving the length in the type.
vecC :: Vector n ℂ -> C n Source #
Convert a vector-sized storable vector to an hmatrix complex vector (parameterized by its lenth), preserving the length in the type.
Matrix
Real
lRows :: forall m n. L m n -> Vector m (R n) Source #
Split an hmatrix matrix (parameterized by its dimensions) to a vector-sized boxed vector of its rows (as hmatrix vectors).
rowsL :: forall m n. Vector m (R n) -> L m n Source #
Join together a vector-sized boxed vector of hmatrix vectors to an hmatrix matrix as its rows.
lCols :: forall m n. L m n -> Vector n (R m) Source #
Split an hmatrix matrix (parameterized by its dimensions) to a vector-sized boxed vector of its columns (as hmatrix vectors).
colsL :: forall m n. Vector n (R m) -> L m n Source #
Join together a vector-sized boxed vector of hmatrix vectors to an hmatrix matrix as its columns.
Complex
mRows :: forall m n. M m n -> Vector m (C n) Source #
Split an hmatrix complex matrix (parameterized by its dimensions) to a vector-sized boxed vector of its rows (as hmatrix complex vectors).
rowsM :: forall m n. Vector m (C n) -> M m n Source #
Join together a vector-sized boxed vector of hmatrix complex vectors to an hmatrix complex matrix as its rows.