hmatrix-vector-sized-0.1.2.0: Conversions between hmatrix and vector-sized types

Copyright(c) Justin Le 2018
LicenseBSD3
Maintainerjustin@jle.im
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Numeric.LinearAlgebra.Static.Vector

Contents

Description

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.

Synopsis

Vector

Real

rVec :: KnownNat n => R n -> Vector n Source #

Convert an hmatrix vector (parameterized by its lenth) to a vector-sized storable vector of Doubles.

vecR :: Vector n -> R n Source #

Convert a vector-sized storable vector to an hmatrix vector (parameterized by its lenth).

Complex

cVec :: KnownNat n => 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. (KnownNat m, KnownNat 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. KnownNat 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. (KnownNat m, KnownNat 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. KnownNat m => 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.

lVec :: forall m n. (KnownNat m, KnownNat n) => L m n -> Vector (m * n) Source #

Flatten an hmatrix matrix into a vector-sized storable vector of its items.

Since: 0.1.1.0

vecL :: forall m n. KnownNat n => Vector (m * n) -> L m n Source #

Shape a vector-sized storable vector of elements into an hmatrix matrix.

Since: 0.1.1.0

Complex

mRows :: forall m n. (KnownNat m, KnownNat 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. KnownNat 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.

mCols :: forall m n. (KnownNat m, KnownNat n) => M m n -> Vector n (C m) Source #

Split an hmatrix complex matrix (parameterized by its dimensions) to a vector-sized boxed vector of its columns (as hmatrix complex vectors).

colsM :: forall m n. KnownNat m => Vector n (C m) -> M m n Source #

Join together a vector-sized boxed vector of hmatrix complex vectors to an hmatrix complex matrix as its columns.

mVec :: forall m n. (KnownNat m, KnownNat n) => M m n -> Vector (m * n) Source #

Flatten an hmatrix complex matrix into a vector-sized storable vector of its items.

Since: 0.1.1.0

vecM :: forall m n. KnownNat n => Vector (m * n) -> M m n Source #

Shape a vector-sized storable vector of elements into an hmatrix complex matrix.

Since: 0.1.1.0