Statistics.Matrix.Types

dense-linear-algebra-0.1.0.0: Simple and incomplete pure haskell implementation of linear algebra

Copyright | 2014 Bryan O'Sullivan
License | BSD3
Safe Haskell | None
Language | Haskell2010

Statistics.Matrix.Types

Description

Basic matrix operations.

There isn't a widely used matrix package for Haskell yet, so we implement the necessary minimum here.

Synopsis

- type Vector = Vector Double
- type MVector s = MVector s Double
- data Matrix = Matrix {
  - rows :: !Int
  - cols :: !Int
  - _vector :: !Vector
  }
- data MMatrix s = MMatrix !Int !Int !(MVector s)
- debug :: Matrix -> String

# Documentation

type Vector = Vector Double #

type MVector s = MVector s Double #

data Matrix #

Two-dimensional matrix, stored in row-major order.

Constructors

Matrix |
Fields rows :: !Int Rows of matrix. cols :: !Int Columns of matrix. _vector :: !Vector Matrix data.

#### Instances

Instances details

Show Matrix # |
Instance details Defined in Statistics.Matrix.Types Methods showsPrec :: Int -> Matrix -> ShowS # show :: Matrix -> String # showList :: [Matrix] -> ShowS #
Eq Matrix # |
Instance details Defined in Statistics.Matrix.Types Methods (==) :: Matrix -> Matrix -> Bool # (/=) :: Matrix -> Matrix -> Bool #

data MMatrix s #

Two-dimensional mutable matrix, stored in row-major order.

Constructors

MMatrix !Int !Int !(MVector s) |

debug :: Matrix -> String #