Module

Data.Matrix

Package
purescript-matrix
Repository
jutaro/purescript-matrix

Binding to mjs library

#Mat Source

newtype Mat s a

Constructors

Instances

#generate Source

generate :: forall s a. Sized s => (Int -> Int -> a) -> Mat s a

/O(rows*cols)/. Generate a matrix from a generator function.

#columns Source

columns :: forall a s. Sized s => Mat s a -> Array (Array a)

#identity' Source

identity' :: forall s. Sized s => Mat s Number

/O(rows*cols)/. Identity matrix of the given order.

#getElem Source

getElem :: forall a s. Sized s => Int -> Int -> Mat s a -> a

/O(1)/. Get an element of a matrix.

#scaleMatrix Source

scaleMatrix :: forall s a. EuclideanRing a => a -> Mat s a -> Mat s a

Scale a matrix by a given factor.

#fromArray Source

fromArray :: forall s a. Sized s => Array a -> Mat s a

#toArray Source

toArray :: forall a s. Mat s a -> Array a

#transpose Source

transpose :: forall s a. Sized s => Mat s a -> Mat s a

/O(rows*cols)/. The transpose of a matrix.