numhask-0.0.1: A numeric prelude
NumHask.HasShape
Description
multi-dimensional numbers with a shape
Synopsis
class HasShape f where Source #
Could possibly be integrated with Representable instance creation
Representable
Minimal complete definition
shape, ndim
Associated Types
type Shape f Source #
Methods
shape :: HasShape f => f -> Shape f Source #
ndim :: HasShape f => f -> Int Source #
Instances
type Shape (SomeTensor a) :: * Source #
shape :: SomeTensor a -> Shape (SomeTensor a) Source #
ndim :: SomeTensor a -> Int Source #
type Shape (SomeVector a) :: * Source #
shape :: SomeVector a -> Shape (SomeVector a) Source #
ndim :: SomeVector a -> Int Source #
type Shape (SomeMatrix a) :: * Source #
shape :: SomeMatrix a -> Shape (SomeMatrix a) Source #
ndim :: SomeMatrix a -> Int Source #
type Shape (Vector r a) :: * Source #
shape :: Vector r a -> Shape (Vector r a) Source #
ndim :: Vector r a -> Int Source #
type Shape (Tensor [Nat] r a) :: * Source #
shape :: Tensor [Nat] r a -> Shape (Tensor [Nat] r a) Source #
ndim :: Tensor [Nat] r a -> Int Source #
type Shape (Matrix Nat Nat m n a) :: * Source #
shape :: Matrix Nat Nat m n a -> Shape (Matrix Nat Nat m n a) Source #
ndim :: Matrix Nat Nat m n a -> Int Source #