blas-0.5: Bindings to the BLAS librarySource codeContentsIndex
BLAS.Tensor.ReadOnly
Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>
Description
Synopsis
class (Tensor x i e, Monad m) => RTensor x i e m where
getSize :: x e -> m Int
newCopy :: x e -> m (x e)
unsafeReadElem :: x e -> i -> m e
getIndices :: x e -> m [i]
getElems :: x e -> m [e]
getAssocs :: x e -> m [(i, e)]
readElem :: (RTensor x i e m, Show i) => x e -> i -> m e
Documentation
class (Tensor x i e, Monad m) => RTensor x i e m whereSource
Class for mutable read-only tensors.
Methods
getSize :: x e -> m IntSource
Get the number of elements stored in the tensor.
newCopy :: x e -> m (x e)Source
Get a copy of the tensor.
unsafeReadElem :: x e -> i -> m eSource
Get the value at the specified index, without doing any range-checking.
getIndices :: x e -> m [i]Source
Returns a lazy list of the indices in the tensor. Because of the laziness, this function should be used with care.
getElems :: x e -> m [e]Source
Returns a lazy list of the elements in the tensor. Because of the laziness, this function should be used with care.
getAssocs :: x e -> m [(i, e)]Source
Returns a lazy list of the elements-index pairs in the tensor. Because of the laziness, this function should be used with care.
show/hide Instances
BLAS1 e => RTensor (DVector t n) Int e IO
BLAS1 e => RTensor (DVector t n) Int e IO
BLAS1 e => RTensor (DVector t n) Int e IO
BLAS1 e => RTensor (DMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (DMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (DMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (BMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (BMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (BMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => RTensor (DiagMatrix t ((,) n n)) ((,) Int Int) e IO
BLAS1 e => RTensor (DiagMatrix t ((,) n n)) ((,) Int Int) e IO
BLAS1 e => RTensor (DiagMatrix t ((,) n n)) ((,) Int Int) e IO
readElem :: (RTensor x i e m, Show i) => x e -> i -> m eSource
Gets the value at the specified index after checking that the argument is in bounds.
Produced by Haddock version 2.3.0