
Data.Matrix.Dense  Stability  experimental  Maintainer  Patrick Perry <patperry@stanford.edu> 





Description 


Synopsis 

type Matrix = DMatrix Imm   module BLAS.Matrix.Base   module BLAS.Matrix.Immutable   module BLAS.Tensor.Base   module BLAS.Tensor.Dense.Immutable   module BLAS.Tensor.Immutable   module BLAS.Tensor.Scalable   matrix :: BLAS1 e => (Int, Int) > [((Int, Int), e)] > Matrix (m, n) e   listMatrix :: Elem e => (Int, Int) > [e] > Matrix (m, n) e   fromCols :: BLAS1 e => (Int, Int) > [Vector m e] > Matrix (m, n) e   fromRows :: BLAS1 e => (Int, Int) > [Vector n e] > Matrix (m, n) e   identity :: BLAS1 e => (Int, Int) > Matrix (m, n) e   row :: Elem e => DMatrix t (m, n) e > Int > DVector t n e   col :: Elem e => DMatrix t (m, n) e > Int > DVector t m e   rows :: Elem e => DMatrix t (m, n) e > [DVector t n e]   cols :: Elem e => DMatrix t (m, n) e > [DVector t m e]   diag :: Elem e => DMatrix t (m, n) e > Int > DVector t k e   submatrix :: Elem e => DMatrix t (m, n) e > (Int, Int) > (Int, Int) > DMatrix t (k, l) e   apply :: BLAS2 e => Matrix (m, n) e > Vector n e > Vector m e   applyMat :: BLAS3 e => Matrix (m, k) e > Matrix (k, n) e > Matrix (m, n) e   sapply :: BLAS2 e => e > Matrix (m, n) e > Vector n e > Vector m e   sapplyMat :: BLAS3 e => e > Matrix (m, k) e > Matrix (k, n) e > Matrix (m, n) e   shift :: BLAS1 e => e > Matrix (m, n) e > Matrix (m, n) e   scale :: BLAS1 e => e > Matrix (m, n) e > Matrix (m, n) e   invScale :: BLAS1 e => e > Matrix (m, n) e > Matrix (m, n) e   coerceMatrix :: DMatrix t mn e > DMatrix t kl e   fromRow :: BLAS1 e => Vector n e > Matrix (one, n) e   fromCol :: BLAS1 e => Vector m e > Matrix (m, one) e   unsafeMatrix :: BLAS1 e => (Int, Int) > [((Int, Int), e)] > Matrix (m, n) e   unsafeRow :: Elem e => DMatrix t (m, n) e > Int > DVector t n e   unsafeCol :: Elem e => DMatrix t (m, n) e > Int > DVector t m e   unsafeDiag :: Elem e => DMatrix t (m, n) e > Int > DVector t k e   unsafeSubmatrix :: Elem e => DMatrix t (m, n) e > (Int, Int) > (Int, Int) > DMatrix t (k, l) e 



Dense matrix type




module BLAS.Matrix.Base 

module BLAS.Matrix.Immutable 

module BLAS.Tensor.Base 

module BLAS.Tensor.Dense.Immutable 

module BLAS.Tensor.Immutable 

module BLAS.Tensor.Scalable 

Creating matrices



Create a new matrix of the given size and initialize the given elements to
the given values. All other elements get set to zero.



Create a new matrix with the given elements in rowmajor order.



Create a matrix of the given shape from a list of columns



Create a matrix of the given shape from a list of rows


Special matrices



Get a new matrix of the given shape with ones along the diagonal and
zeroes everywhere else.


Rows and columns



Get a vector view of the given row in a matrix.



Get a vector view of the given column in a matrix.



Get a list of vector views of the rows of the matrix.



Get a list of vector views of the columns of the matrix.


Diagonals



diag a 0 gets a vector view of the main diagonal of a. diag a k for
k positive gets a view of the kth superdiagonal. For k negative, it
gets a view of the (k)th subdiagonal.


Augmenting matrices



submatrix a ij mn returns a view of the submatrix of a with element (0,0)
being element ij in a, and having shape mn.


Matrix multiplication



Multiply a matrix by a vector.



Multiply a matrix by a matrix.



Multiply a scaled matrix by a vector.



Multiply a scaled matrix by a matrix.


Matrix arithmetic



Form a new matrix by adding a value to every element in a matrix.



Create a new matrix by scaling another matrix by the given value.



Form a new matrix by dividing every element by a value.


Casting matrices



Coerce the phantom shape type from one type to another.


Converting between vectors and matrices



Get a matrix from a row vector.



Get a matrix from a column vector.


Unsafe operations



Same as matrix but does not do any bounds checking.



Same as row, but does not do any bounds checking.



Same as col, but does not do any bounds checking.



Same as diag, but does not do any bounds checking.



Same as submatrix but does not do any bounds checking.


Produced by Haddock version 2.3.0 