Stability | experimental |
---|---|

Maintainer | Patrick Perry <patperry@stanford.edu> |

An overloaded interface for immutable matrices. The matrices provide access to rows and columns, and can operate via multiplication on immutable dense vectors and matrices.

- class (MatrixShaped a, BLAS3 e) => IMatrix a e
- row :: IMatrix a e => a (m, n) e -> Int -> Vector n e
- col :: IMatrix a e => a (m, n) e -> Int -> Vector m e
- rows :: IMatrix a e => a (m, n) e -> [Vector n e]
- cols :: IMatrix a e => a (m, n) e -> [Vector m e]
- (<*>) :: IMatrix a e => a (m, n) e -> Vector n e -> Vector m e
- (<**>) :: IMatrix a e => a (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e
- sapply :: IMatrix a e => e -> a (m, n) e -> Vector n e -> Vector m e
- sapplyMat :: IMatrix a e => e -> a (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e

# The IMatrix type class

class (MatrixShaped a, BLAS3 e) => IMatrix a e Source

A type class for immutable matrices. The member functions of the type class do not perform any checks on the validity of shapes or indices, so in general their safe counterparts should be preferred.

# Rows and columns

# Multiplication

(<*>) :: IMatrix a e => a (m, n) e -> Vector n e -> Vector m eSource

Matrix multiplication by a vector.

(<**>) :: IMatrix a e => a (m, k) e -> Matrix (k, n) e -> Matrix (m, n) eSource

Matrix multiplication by a matrix.