dense-linear-algebra-0.1.0.0: Simple and incomplete pure haskell implementation of linear algebra
Copyright (c) 2014 Bryan O'Sullivan
License BSD3
Safe Haskell None
Language Haskell2010

Statistics.Matrix.Mutable

Description

Basic mutable matrix operations.

Synopsis

Documentation

data MMatrix s Source #

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

Constructors

MMatrix ! Int ! Int !( MVector s)

bounds :: MMatrix s -> Int -> Int -> ( MVector s -> Int -> r) -> r Source #

Given row and column numbers, calculate the offset into the flat row-major vector.

unsafeNew Source #

Arguments

:: Int

Number of row

-> Int

Number of columns

-> ST s ( MMatrix s)

Allocate new matrix. Matrix content is not initialized hence unsafe.

unsafeBounds :: MMatrix s -> Int -> Int -> ( MVector s -> Int -> r) -> r Source #

Given row and column numbers, calculate the offset into the flat row-major vector, without checking.