tensor-0.1: A completely type-safe library for linear algebra

Data.Tensor.Vector

Description

This module define a datatype `Tensor` which implements the classes and methods defined in Data.Tensor and Data.Tensor.LinearAlgebra. It is represented internally as a `Vector`.

Documentation

data Tensor i e Source

Instances

 (Bounded i, Ordinal i, Bounded j, Ordinal j) => Matrix i j (Tensor (:|: i (:|: j Nil)) e) (Cardinal n, MultiIndex i, MultiIndex j, MultiIndexConcat n i j) => DirectSum n (Tensor i e) (Tensor j e) (Num e, Cardinal n, MultiIndex i, MultiIndex j, JoinList n i j) => Product n (Tensor i e) (Tensor j e) Functor (Tensor i) Zip (Tensor i) (Bounded i, Cardinality i, MultiIndex i) => FromList (Tensor i) (Bounded i, Ordinal i, Sum i i) => SquareMatrix (Tensor (:|: i (:|: i Nil))) DotProduct (Tensor i) (Bounded i, Cardinality i, MultiIndex i) => VectorSpace (Tensor i) (Bounded i, Cardinality i, MultiIndex i) => FromVector (Tensor i) Eq e => Eq (Tensor i e) Show e => Show (Tensor i e) (Ordinal i, Ordinal j) => Transpose (Tensor (:|: i (:|: j Nil)) e) (Bounded i, MultiIndex i) => Tensor (Tensor i e) (Eq e, Fractional e, Ordinal i, Ordinal j) => LinearSystem (Tensor (:|: i (:|: j Nil)) e) (Tensor (:|: i Nil) e) (Eq e, Fractional e, Ordinal i, Ordinal j, Ordinal k, Sum j k) => LinearSystem (Tensor (:|: i (:|: j Nil)) e) (Tensor (:|: i (:|: k Nil)) e)

type Vector n = Tensor (n :|: Nil)Source

type Matrix m n = Tensor (m :|: (n :|: Nil))Source

class FromVector t whereSource

Methods

fromVector :: Vector e -> t eSource

Instances

 (Bounded i, Cardinality i, MultiIndex i) => FromVector (Tensor i)