Module

Data.ST.Matrix

Package
purescript-matrix
Repository
jutaro/purescript-matrix

Binding to mjs library

#STMat Source

newtype STMat s h a

Constructors

#copyImpl Source

copyImpl :: forall r h b a. a -> Eff (st :: ST h | r) b

#freeze Source

freeze :: forall r h a. STArray h a -> Eff (st :: ST h | r) (Array a)

Create an immutable copy of a mutable array.

#thaw Source

thaw :: forall r h a. Array a -> Eff (st :: ST h | r) (STArray h a)

Create a mutable copy of an immutable array.

#unsafeFreeze Source

unsafeFreeze :: forall h a. STArray h a -> Array a

Freeze an ST array. Do not mutate the STArray afterwards!

#unsafeThaw Source

unsafeThaw :: forall h a. Array a -> STArray h a

#cloneSTMat Source

cloneSTMat :: forall r a h s. (STMat s h a) -> Eff (st :: ST h | r) (STMat s h a)

#fromSTMat Source

fromSTMat :: forall r a h s. Sized s => (STMat s h a) -> Eff (st :: ST h | r) (Mat s a)

#toSTMat Source

toSTMat :: forall r a h s. (Mat s a) -> Eff (st :: ST h | r) (STMat s h a)

#copyToSTMat Source

copyToSTMat :: forall r a h s. (Mat s a) -> (STMat s h a) -> Eff (st :: ST h | r) Unit

#identityST' Source

identityST' :: forall r h s. Sized s => Eff (st :: ST h | r) (STMat s h Number)

#scaleSTMatrixInt Source

scaleSTMatrixInt :: forall r h a. EuclideanRing a => a -> STArray h a -> Eff (st :: ST h | r) Unit

#scaleSTMatrix Source

scaleSTMatrix :: forall r h a s. EuclideanRing a => a -> (STMat s h a) -> Eff (st :: ST h | r) (STMat s h a)

#fromMatrix Source

fromMatrix :: forall a r h s. Mat s a -> Eff (st :: ST h | r) (STMat s h a)

#runSTMatrix Source

runSTMatrix :: forall r a s. (forall h. Eff (st :: ST h | r) (STMat s h a)) -> Eff r (Mat s a)