statistics-0.12.0.0: A library of statistical types, data, and functions

Safe HaskellNone

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 !Int !(MVector s) 

bounds :: MMatrix s -> Int -> Int -> (MVector s -> Int -> r) -> rSource

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

unsafeWrite :: MMatrix s -> Int -> Int -> Double -> ST s ()Source

unsafeModify :: MMatrix s -> Int -> Int -> (Double -> Double) -> ST s ()Source

immutably :: NFData a => MMatrix s -> (Matrix -> a) -> ST s aSource

unsafeBounds :: MMatrix s -> Int -> Int -> (MVector s -> Int -> r) -> rSource

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