Stability | experimental |
---|---|
Maintainer | Patrick Perry <patperry@stanford.edu> |
Data.Tensor.Class
Description
Overloaded interface for mutable and immutable tensors. This module contains the common functionality for the classes in Data.Tensor.Class.ITensor and Data.Tensor.Class.MTensor.
Documentation
class (Ix i, Show i) => Shaped x i | x -> i whereSource
The base class for objects with shapes and indices (i.e. Vector, Matrix, etc.).
Methods
Get the shape of the tensor. For vectors this is the dimension.
For matrices, this will be a pair (m,n)
of the number of rows
and columns.
bounds :: x n e -> (i, i)Source
Get the range of valid indices in the tensor.
Instances
Shaped IOVector Int | |
Shaped Vector Int | |
Shaped IOMatrix (Int, Int) | |
Shaped Matrix (Int, Int) | |
Shaped IOBanded (Int, Int) | |
Shaped Banded (Int, Int) | |
Shaped (STVector s) Int | |
MatrixShaped a => Shaped (Herm a) (Int, Int) | |
MatrixShaped a => Shaped (Tri a) (Int, Int) | |
Shaped (STMatrix s) (Int, Int) | |
Shaped (STBanded s) (Int, Int) |