Operations on matrices (nested parallel vectors). All operations in this module assume rectangular matrices.

- type Matrix m n a = Par m :>> (Par n :>> Data a)
- freezeMatrix :: (NaturalT m, NaturalT n, Storable a) => Matrix m n a -> Data (m :> (n :> a))
- unfreezeMatrix :: (NaturalT m, NaturalT n, Storable a) => Data Int -> Data Int -> Data (m :> (n :> a)) -> Matrix m n a
- matrix :: (NaturalT m, NaturalT n, Storable a, ListBased a ~ a) => [[a]] -> Matrix m n a
- transpose :: Matrix m n a -> Matrix n m a
- mul :: (Primitive a, Num a) => Matrix m n a -> Matrix n p a -> Matrix m p a
- flatten :: Matrix m n a -> VectorP (m :* n) a
- diagonal :: Matrix n n a -> VectorP n a

# Documentation

freezeMatrix :: (NaturalT m, NaturalT n, Storable a) => Matrix m n a -> Data (m :> (n :> a))Source

Converts a matrix to a core array.

unfreezeMatrix :: (NaturalT m, NaturalT n, Storable a) => Data Int -> Data Int -> Data (m :> (n :> a)) -> Matrix m n aSource

Converts a core array to a matrix.

matrix :: (NaturalT m, NaturalT n, Storable a, ListBased a ~ a) => [[a]] -> Matrix m n aSource

Constructs a matrix.