|Maintainer||Alberto Ruiz <email@example.com>|
Tensor computations. Indices can only be contracted if they are of different
- type Tensor t = NArray Variant t
- data Variant
- listTensor :: Coord t => [Int] -> [t] -> Tensor t
- superindex :: Coord t => Name -> [Tensor t] -> Tensor t
- subindex :: Coord t => Name -> [Tensor t] -> Tensor t
- vector :: [Double] -> Tensor Double
- covector :: [Double] -> Tensor Double
- transf :: [[Double]] -> Tensor Double
- switch :: Tensor t -> Tensor t
- cov :: NArray i t -> Tensor t
- contrav :: NArray i t -> Tensor t
- forget :: NArray i t -> Array t
- module Numeric.LinearAlgebra.Array
The Tensor type
Creates a tensor from a list of dimensions and a list of coordinates. A positive dimension means that the index is assumed to be contravariant (vector-like), and a negative dimension means that the index is assumed to be covariant (like a linear function, or covector). Contractions can only be performed between indices of different type.
Tensor creation utilities
Create a contravariant 1st order tensor from a list of coordinates.
Create a covariant 1st order tensor from a list of coordinates.
Create a 1-contravariant, 1-covariant 2nd order from list of lists of coordinates.
Variant nature of all dimensions to the opposite ones.
General array operations