| Safe Haskell | Safe-Inferred |
|---|
Data.Tensor
- class Tensor t where
- replicate :: Tensor t => Elem t -> t
- elemMap :: (Tensor t1, Tensor t2, Index t1 ~ Index t2) => (Elem t1 -> Elem t2) -> t1 -> t2
- indexMap :: (Tensor t1, Tensor t2, Elem t1 ~ Elem t2) => (Index t1 -> Index t2) -> t2 -> t1
- class FromList t where
- fromList :: [e] -> t e
- class DirectSum n t1 t2 where
- class Transpose t where
- type TransposeSpace t
- transpose :: t -> TransposeSpace t
- class Zip t where
- zipWith :: (a -> b -> c) -> t a -> t b -> t c
- class Sliceable i j t where
Documentation
Methods
(!) :: t -> Index t -> Elem tSource
returns the dimensions of the dims. In any
instance of TensorTensor should be independent of its
argument and work on dims.
| Returns the undefinedent of Elemt corresponding to .
Index t
generate :: (Index t -> Elem t) -> tSource
Generates a according to the given function.
Tensor
Instances
| MultiIndex i => Tensor (Tensor i e) |
Instances
| MultiIndex i => FromList (Tensor i) |
class DirectSum n t1 t2 whereSource
Instances
| (Cardinal n, MultiIndex i, MultiIndex j, MultiIndexConcat n i j) => DirectSum n (Tensor i e) (Tensor j e) |
Associated Types
type TransposeSpace t Source
Methods
transpose :: t -> TransposeSpace tSource
class Sliceable i j t whereSource
Slices the Tensort by dropping i at the beginning of its
and Indexj at the end. The result has type .
Slice i j t
Methods
slice :: i -> j -> t -> Slice i j tSource
Extracts the of Slicet for the given initial and final
indices i and j.
Instances
| (MultiIndex i, MultiIndex j, Extend i l, ReverseList j, ReverseList (Ext i l), Extend (Reverse j) (Reverse (Ext i l)), ReverseList (Ext (Reverse j) (Reverse (Ext i l)))) => Sliceable i j (Tensor l e) |